In recent weeks, a few different people have asked me how to modify the Scrum template such that a Task or Bug is marked as Done during a check-in. We left this out of the original state flow because we wanted the done state transition to be very intentional, but it’s a common practice and a very handy feature.
To change this behavior on an in-flight project you want to add the Microsoft.VSTS.Actions.Checkin action to the appropriate state transition in your work item definition. With the Scrum template, this would be on the In Progress –> Done transition for the Task work item, and the Committed –> Done transition for the Bug work item.
Below is a snippet of the In Progress –> Done transition on the Task work item after applying the changes.
<TRANSITION from="In Progress" to="Done"> <ACTIONS> <ACTION value="Microsoft.VSTS.Actions.Checkin" /> </ACTIONS> <REASONS> <DEFAULTREASON value="Work finished" /> </REASONS></TRANSITION>
The easiest way to make these changes is to download and install the Team Foundation Server 2010 Power Tools which includes the Process Editor. Once you’ve done that, open Team Explorer and follow the steps below:
The next time you make a check-in, you can choose to “Resolve” any Task that is in the In Progress state. The Task will be automatically moved to the Done state and associated with the changeset.