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.
Open the “User Story” WIT from the Server.
On the Fields tab click New.
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.
Still in the Field Definition dialog, click on the Rules tab.
Click New, select ALLOWEDVALUES and click OK.
In the ALLOWEDVALUES dialog continue to click new and enter the desired roles until you have all the roles you want to use.
Click OK back to the WIT editor.
Go to the Layout Tab.
Right click on the Column node under Group – Classification and select New Control.
Setup the fields similar to the following:
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!