TFS 2012: How to show bugs on the board

As you know, the new TFS 2012 now has a "kanban" board. By default, though, it shows only tasks. Bugs aren't on the list.

That can be fixed, however.

For bugs to show up on the board alongside tasks, they have to be put into the Microsoft.TaskCategory group. To do that, export the list of categories with the witadmin utility:

witadmin exportcategories /f:Categories.xml /collection:http://tfsserver:8080/tfs/defaultcollection /p:ProjectName

Then tweak the Categories.xml file a little:

<CATEGORY refname="Microsoft.TaskCategory" name="Task Category">
  <DEFAULTWORKITEMTYPE name="Task" />
  <WORKITEMTYPE name="Bug" />
</CATEGORY>

Then import it back with the same witadmin utility.

witadmin importcategories /f:Categories.xml /collection:http://tfsserver:8080/tfs/defaultcollection /p:ProjectName

Most likely, the task board will now stop opening altogether. Don't worry: the Bug work item simply doesn't have the Discipline and Remaining Work fields by default. That can be solved too.

Export the bug definition to Bug.xml

witadmin exportwitd /n:Bug /f:bug.xml /collection:http://tfsserver:8080/tfs/defaultcollection /p:ProjectName

Add the required 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="Bug" />
  </ALLOWEDVALUES>
</FIELD>
<FIELD name="Remaining Work" refname="Microsoft.VSTS.Scheduling.RemainingWork" type="Double" reportable="measure" formula="sum">
  <HELPTEXT>An estimate of the work remaining to fix this bug (in person hours)</HELPTEXT>
</FIELD>
<FIELD name="Completed Work" refname="Microsoft.VSTS.Scheduling.CompletedWork" type="Double" reportable="measure" formula="sum">
  <HELPTEXT>The work that has been fixed this bug (in person hours)</HELPTEXT>
</FIELD>
<FIELD name="Original Estimate" refname="Microsoft.VSTS.Scheduling.OriginalEstimate" type="Double" reportable="measure" formula="sum">
  <HELPTEXT>The original estimate of units of work required to fix this bug</HELPTEXT>
</FIELD>

In the WORKFLOW section, add

<Column PercentWidth="30">
	<Control FieldName="Microsoft.VSTS.Scheduling.OriginalEstimate" Type="FieldControl" Label="Original Estimate:" LabelPosition="Left"/>
</Column>
<Column PercentWidth="30">
	<Control FieldName="Microsoft.VSTS.Scheduling.RemainingWork" Type="FieldControl" Label="Remaining work:" LabelPosition="Left" NumberFormat="DecimalNumbers" MaxLength="10"/>
</Column>
<Column PercentWidth="30">
	<Control FieldName="Microsoft.VSTS.Scheduling.CompletedWork" Type="FieldControl" Label="Completed work:" LabelPosition="Left" NumberFormat="DecimalNumbers" MaxLength="10"/>
</Column>

Save the changes and import them into the project:

witadmin importwitd /f:bug.xml /collection:http://tfsserver:8080/tfs/defaultcollection /p:ProjectName

Now the board will show both tasks and bugs.

Only registered users can leave a comment.

Sign in or register to leave a comment.