Adding additional states onto the Agile Task Board in TFS2012
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
Here goes…
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 (https://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>
/f:<export_filename>
e.g.
WITAdmin.exe exportcommonprocessconfig /collection:https://VSALM:8080/tfs/MyCollection
/p:MyScrumProject /f:MyCommonConfig.xml
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:
<TaskWorkItems category=”Microsoft.TaskCategory”>
<States>
<State type=”Proposed” value=”To Do” />
<State type=”InProgress” value=”In Progress” />
<State type=”InProgress” value=”Review” />
<State type=”Complete” value=”Done” />
</States>
</TaskWorkItems>
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>
/f:<export_filename>
e.g.
WITAdmin.exe importcommonprocessconfig /collection:https://VSALM:8080/tfs/MyCollection
/p:MyScrumProject /f:MyCommonConfig.xml
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.
Colin.
Comments
Anonymous
February 12, 2013
Sorry if this is a dupe Comment... Thank you for your post on this subject. I would also like to add content to what is displayed on the tasks themselves. Is this possible? Right now only the Title, Remaining Work, and Assigned To fields are displayed. An additional field here would be helpful to my team.Anonymous
February 12, 2013
@Spaceman - Adding new fields is into areas currently undocumented. You may want to check the approach our MVP Tiago Pascoal is taking in his blog and Taskboard enhancer (http://pascoal.net/)specifically his post around work item ids (pascoal.net/.../adding-work-item-ids-to-team-foundation-server-board) as this is adding a field onto the task board cards. Colin.Anonymous
September 09, 2013
Thank you very muchAnonymous
November 07, 2013
Hi, I've added new state in the Workflow view but when I'm setting the new state to item I'm receiving the message "TestItem" was removed because of your recent changes, and the item is dissapearing from Product Backlog view. Can you please advice me what do I have to change to make sure item will be listen on Product Backlog with my custom state?Anonymous
January 30, 2014
Hi Colin, Great article. We just started to use TFS 2012 and do you know how to add task ID on to the individual task board? We need to refer to task by its ID during daily scrum. Thanks a lot in advance.Anonymous
January 30, 2014
The comment has been removedAnonymous
March 05, 2014
Thank you. This is the sort of stuff I really wish TFS handled better. It's good to see we can fix it, but it feels like this should just be part of the power tools.Anonymous
June 09, 2014
Thank you so much, this is very helpful!Anonymous
October 21, 2014
Thank you. This has helped me a lot.Anonymous
October 23, 2014
Nice - simple instructions, worked perfectly. Wish everything was that easy :)Anonymous
April 17, 2015
Thanks forum the great tutorial. Is it also possible to get this all in a template? The first part I can fint, these workitems are in the template, but the Common Process Template, I can't find.Anonymous
June 16, 2015
The comment has been removed