As I mentioned, I received numerous questions during my presentation at the WI .NET User Group a few weeks back. One of the them was: “Is there a way to add the subject of a user story as an explicit field?” After probing the individual a bit, I discovered he wanted to be able to sort user stories bases on this field. As a recap a user story is typically in the form:
As a <type of user> I want <some goal> so that <some reason>
In this post I will show you how to add the <type of user> or user story role to the user story in TFS 2010.
First make sure you have TFS Power Tools installed. For the TFS 2010 RC, download them here.
Second, I’m going to show you how to do it using the MSF for Agile v5.0 User Story Work Item Type (WIT). While other templates are going to be slightly different, you can use this same method as a general guideline on how to do this.
Step 1:
Open the “User Story” WIT from the Server.
Step 2:
On the Fields tab click New.
Step 3:
Setup the new field similar to that below. You will probably want to change “MyCompany” in the Reference name to be the name of your company.
Step 4:
Still in the Field Definition dialog, click on the Rules tab.
Step 5:
Click New, select ALLOWEDVALUES and click OK.
Step 6:
In the ALLOWEDVALUES dialog continue to click new and enter the desired roles until you have all the roles you want to use.
Step 7:
Click OK back to the WIT editor.
Step 8:
Go to the Layout Tab.
Step 9:
Right click on the Column node under Group – Classification and select New Control.
Step 10:
Setup the fields similar to the following:
Step 11:
Click Save.
Your’re Done!
Your User Story screen should now resemble the following:
You will also be able to add the Story Role column to queries and sort and filter by it.
Good luck and enjoy!