When you are using the CMMI project template in TFS 2012 and use the Backlog to track your Work Items there are scenarios where you want to see Bugs in your Backlog. The Scrum template already has this behavior by default.
On the internet there is some guidance to make this possible, but that information is not complete. (http://msdn.microsoft.com/en-us/library/vstudio/jj920163.aspx)
So here you have a complete step-by-step guidance to do so.
Add the required fields to the bug work item type
For the configuration to be valid, you must first add the estimate and backlog sort order fields to the bug work item type.
-
If you don’t have admin permissions for your team project, get them.
-
Open a Command Prompt window where either Visual Studio or Team Explorer is installed and enter:
cd %programfiles%\Microsoft Visual Studio 11.0\Common7\IDE
(On a 64-bit edition of Windows, replace %programfiles% with %programfiles(x86)%)
-
Export the bug work item type definition.
witadmin exportwitd /collection:"http://MyServer:8080/tfs/DefaultCollection" /p:"MyProject" /n:bug /f:"Directory/bug.xml"
-
Add the Discipline and Size fields.
<FIELDS> … <FIELD name="Discipline" refname="Microsoft.VSTS.Common.Discipline" type="String" reportable="dimension"> <HELPTEXT>The discipline to which the task belongs</HELPTEXT> <ALLOWEDVALUES expanditems="true"> <LISTITEM value="Development" /> <LISTITEM value="Analysis" /> <LISTITEM value="User Experience" /> <LISTITEM value="User Education" /> <LISTITEM value="Test" /> </ALLOWEDVALUES> </FIELD> <FIELD name="Size" refname="Microsoft.VSTS.Scheduling.Size" type="Double" reportable="measure" formula="sum"> <HELPTEXT>The size of work estimated for implementing this requirement</HELPTEXT> </FIELD> </FIELDS>
-
Add the Stack Rank, Discipline and Size fields to the work item form.
<FORM> … <Column PercentWidth="33"> <Group Label="Planning"> <Column PercentWidth="25"> <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Priority" Label="Priority" LabelPosition="Left" /> <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Severity" Label="Severity" LabelPosition="Left" /> <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Triage" Label="Triage" LabelPosition="Left" /> <Control Type="FieldControl" FieldName="Microsoft.VSTS.CMMI.Blocked" Label="Blocked" LabelPosition="Left" /> <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.StackRank" Label="Stack Rank:" LabelPosition="Left" NumberFormat="WholeNumbers" MaxLength="10" /> <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Discipline" Label="Discipline" LabelPosition="Left" /> <Control Type="FieldControl" FieldName="Microsoft.VSTS.Scheduling.Size" Label="Size" LabelPosition="Left" /> </Column> </Group> </Column> … </FORM>
-
Import the updates bug definition.
witadmin importwitd /collection:"http://MyServer:8080/tfs/DefaultCollection" /p:"MyProject" /f:"Directory/bug.xml"
Add the bug work item type to the Requirements Category
-
Export the categories definition.
witadmin exportcategories /collection:"http://MyServer:8080/tfs/DefaultCollection" /p:"MyProject" f:"Directory/categories.xml"
-
Add bug to the Requirements Category.
<CATEGORY refname="Microsoft.RequirementCategory" name="Requirement Category"> <DEFAULTWORKITEMTYPE name="User Story" /> <WORKITEMTYPE name="Bug" /> </CATEGORY>
-
Import the categories file.
witadmin importcategories /collection:"http://MyServer:8080/tfs/DefaultCollection" /p:"MyProject" /f:"Directory/categories.xml"
Confirm that you can add bugs to the product backlog
Open the product backlog page, or refresh the page if it’s already open.
You should see a drop-down menu for the work item Type.
Modify column configuration for your product backlog board
When you go to the product backlog board after your modifications you will get the following error:
Click on the “correct this now” link. In the screen that follows you need to map the properties of the Bug type to the columns in your board.
Click OK to save your changes. Your board should display correctly: