The new Agile Task Board is an excellent way of working in a Sprint, visually keeping track of tasks on either a per PBI basis, or on a user-by-user basis. If you’ve not seen the board in action before I recommend you check our own Giles Davies demoing the feature in this video (17mins 10 seconds in): https://channel9.msdn.com/Events/TechDays/UK-Tech-Days/Agile-development-with-Visual-Studio-2011
The Task Board also like many things in TFS is configurable so when a customer asked me if they could add an additional swim lane to their board I thought it might be a useful blog post to share here.
In this customer’s instance they wanted to add to the out of the box Scrum v2.0 task workflow to have a “Review” state inserted in-between the standard “In Progress” and “Done” states. Then they want this new state as a new swim lane on the task board.
I need to split this up into two basic areas:
- Adding an extra state into the existing task work item
- Add the necessary changes to get my extra swim lane on the task board
Adding an extra state into the existing task work item
OK so much of this work is similar to editing we would have had to do in TFS2010 to accomplish this task.
First I load up Process Template Editor from the latest TFS Power Tools (http://visualstudiogallery.msdn.microsoft.com/b1ef7eb2-e084-4cb8-9bc7-06c3bad9148f). Head in visual Studio to the Tools->Process Editor -> Work Item Types -> Open WIT from Server… menu option. Use this to pick my Project and the Task work item within this that I wish to edit.
From the Toolbox in the IDE I add new states and transitions and amend an existing transition so I get the following changes/additions…
Going through the 4 changes shown in the above diagram are:
1) Add a new state called “Review”. Within this state I have added two new field rules (same as those seen in the “Done” state). The field rules are for Microsoft.VSTS.Scheduling.RemainingWork and Microsoft.VSTS.CMMI.Blocked with both having a rule of EMPTY. This will ensure when we are in this state our Task will have 0 remaining hours and not be blocked. You can obviously omit these rules if they don’t apply to your organisation, for example if you want this review work to be part of the remaining hours.
2) The existing transition from “In Progress” to “Done” I edited the end state from “Done” to “Review”. I then changed the reason to read something more appropriate like “Work ready for review”.
3) A new transition between “Review” and “In Progress” was added with a reason of “Re-work required”. This will enable transitions back to “In Progress” should more work be found in “Review” to complete. On this transition I added a Field rule again for Microsoft.VSTS.Scheduling.RemainingWork to REQUIRED, as I want any work moving down this transition to require that we have some time in the work item when it is in the “In Progress” state (this is similar to out of box “Done” to “In Progress” transition).
4) Finally I added a new transition between “Review” and “Done” with a single reason of “Reviewed successfully”. This will allow a successful review to transition into the “Done” state as required.
With the changes made to our Task work item we can save the item and move on to enabling our swim lane.
Add the necessary changes to get my extra swim lane on the task board
Unfortunately for these process template amendments we’re not going to be able to use the Process Template Editor so will have to drop to some command line tools and simple XML editing.
1) Export the Common Process Config from your TFS project using WITADMIN using a command like this:
WITAdmin.exe exportcommonprocessconfig /collection:<collection_url> /p:<project_name>
WITAdmin.exe exportcommonprocessconfig /collection:http://VSALM:8080/tfs/MyCollection
2) Open up the XML file and locate <TaskWorkItems category=”Microsoft.TaskCategory”> and inside the <States> add an extra state of:
<State type=”InProgress” value=”Review” />
So the whole TaskWorkItems looks something like this:
<State type=”Proposed” value=”To Do” />
<State type=”InProgress” value=”In Progress” />
<State type=”InProgress” value=”Review” />
<State type=”Complete” value=”Done” />
This will add a mapping for your new state and thus include a new swimming lane as required into the board. Save the edited file.
3) Import your amended Common Process Config file back to your TFS project using WITADMIN using a command like this:
WITAdmin.exe importcommonprocessconfig /collection:<collection_url> /p:<project_name>
WITAdmin.exe importcommonprocessconfig /collection:http://VSALM:8080/tfs/MyCollection
With all this complete you should have an additional swimming lane for the Review State in your board. All the modelled transitions and rules should hold true on the board in line with the work item rule requirements.