Setting Remaining Work to Zero when closing a work item in TFS
Question:
How can I make sure that the "Remaining Work" field is set to 0 when the work item is closed (for example when associating a work item during checking-in)?
Short Answer:
You can achieve this using the <COPY> rule on the transition to the "Closed" state.
Step-by-Step instructions:
- For the desired transition (in this example from "Active" to "Closed").
- Add a field reference to "Microsoft.VSTS.Scheduling.RemainingWork"
- Add a new rule of type "COPY"
- Choose From = "value" and enter value = "0"
- The resulting XML should look something like
- Verification: After transitioning a task work item from "Active" to the "Closed" state "Remaining Work" is set to zero.