The default Agile TFS template ships with three states: New, Active and Closed.

A common question that I am asked is how to add an extra stage to the TFS taskboard.

While this is not trivial in TFS 2012, it’s really not that hard once you know how, and is being made easier in newer versions of TFS.

clip_image001

Figure: We will demonstrate adding a ‘Testing’ column.

Step 1: Ensure that you are an administrator of the Team Project you are updating

Step 2: Download the Team Foundation Server 2012 Power Tools

- In Visual Studio select Tools, and then Extensions and Updates

clip_image002

Figure: Select Online from the left menu, enter Team Foundation 2012 in the search field, click the Download button on Microsoft Visual Studio Team Foundation Server 2012 Power Tools

Step 3: Export the Task Work Item Type

To add a new column to the task board, we need to add that status to the work item type definition.

clip_image003

Figure: From the Tools menu select, Process Editor, then Work Item Types and then Open WIT from Server

clip_image004

Figure: Expand the correct Team Project and select the Task work item type.

Step 4: Add the Testing state to the Task WIT

clip_image005

Figure: Select the Workflow tab. Open the toolbox and drag a State component onto the design surface. Right click on the new State, select Properties and set the Name property to Testing

clip_image0061

Figure: Select the Transition Link component from the toolbox. Now click on the Active state and drag your mouse to the Testing state.

clip_image0071

Figure: A transition will have been added from Active to Testing.

clip_image0081

Figure: Right click on the Transition and choose Open Details. Go to the Reasons tab and Edit the reason value. Suggested test: ‘Ready for Testing’. You can click on the chevrons to expand the transition to be able to more clearly see the assigned properties.

Additional actions and Fields can also be specified but that is beyond the scope of this post.

clip_image0091

Figure: Repeat the process above to add transitions from Testing to Complete (with a reason of ‘Testing Complete’) and from Testing back to Active (with a reason of ‘Failed Testing’).

clip_image0101

Figure: Save the template to a known location on your hard drive so that it can be imported in the next step. E.g. c:\Temp\TeamProjectName_Task.wit

Step 5: Import the saved WIT

clip_image0111

Figure: From the Tools menu select Process Editor, then Work Item Types and then Import WIT.

clip_image0121

Figure: Browse to the location of the saved file, select the Team Project you wish to import the WIT into and click OK.

clip_image0131

Figure: When you edit a task, the Testing status is now available. It is not yet however added to the board.

Step 6: Export the Process Template Config

This is the part that I always forget to do. After you have edited the Work Item Type, you still need to update the process template to include the State on the Task Board.

clip_image0141

Figure: Open a command prompt, change to the Visual Studio IDE Folder and execute the following command

witadmin exportcommonprocessconfig /collection:CollectionURL /p:ProjectName /f:"DirectoryPath\CommonConfiguration.xml"
for our instance the command required was
witadmin exportcommonprocessconfig /collection:http://ourserver:8080/tfs/CollectionName /p:ProjectSparrow /f:"c:\Temp\CommonConfiguration.xml"

Step 7: Edit the Process Template Config

clip_image0151

Figure: Edit the exported file. Find the section for TaskWorkItems and add the line highlighted above.
<State type=”InProgress” value=”Testing” />
Save the file.

Step 8: Import the Process Template Config

clip_image0161

Figure: Execute the following command

witadmin importcommonprocessconfig /collection:CollectionURL /p:ProjectName /f:"DirectoryPath\CommonConfiguration.xml"
for our instance the command required was
witadmin importcommonprocessconfig /collection:http://ourserver:8080/tfs/CollectionName /p:ProjectSparrow /f:"c:\Temp\CommonConfiguration.xml"

 

clip_image0013

Figure: View your task board and you will have your new column!