1
votes

i have an Agile/Scrum hosted in TFS2013 Update2.and want to show bugs as task not a backlog item. The issue was asked before for TFS 2012 Here.but it seems even in different updates, the story is different.according to MSDN guid for this issue by changing some part of config files.this document is written for visual studio 2013 so i guess it must be for TFS 2013!

first of all forget coping the MSDN code to your XML Config files.at least in my case it was a huge mistake.so here is the first Step

1-Edit the Bug work item definition: Add the Activity and Remaining Work fields to the FIELDS and FORM sections.

although element that could add to FORM section must be different.otherwise implementing will raise errors such problems with Microsoft.VSTS.Common.StackRank & Microsoft.VSTS.Common.Priority. so as MSDN said ( You can simply copy the Groups defined in the Task work item type and replace the Groups that are there) i copied mine:

<Group Margin="(10,0,0,0)">
      <Column PercentWidth="50">
        <Group Label="Status">
          <Column PercentWidth="100">
            <Control FieldName="System.AssignedTo" Type="FieldControl" Label="Assi&amp;gned To" LabelPosition="Left" />
            <Control FieldName="System.State" Type="FieldControl" Label="Stat&amp;e" LabelPosition="Left" />
            <Control FieldName="System.Reason" Type="FieldControl" Label="Reason" LabelPosition="Left" ReadOnly="True" />
          </Column>
        </Group>
      </Column>
      <Column PercentWidth="50">
        <Group Label="Details">
          <Column PercentWidth="100">
            <Control FieldName="Microsoft.VSTS.Scheduling.RemainingWork" Type="FieldControl" Label="Remaining Work" LabelPosition="Left" />
            <Control FieldName="Microsoft.VSTS.Common.BacklogPriority" Type="FieldControl" Label="Backlog Priority" LabelPosition="Left" />
            <Control FieldName="Microsoft.VSTS.Common.Activity" Type="FieldControl" Label="Activity" LabelPosition="Left" />
            <Control FieldName="System.AreaPath" Type="WorkItemClassificationControl" Label="&amp;Area" LabelPosition="Left" />
          </Column>
        </Group>
      </Column>
    </Group>

and there was this line that cause error so i ignore this one:

<Control FieldName="Microsoft.VSTS.CMMI.Blocked" Type="FieldControl" Label="Blocked" LabelPosition="Left" />

anyway moving forward to second step

2-Edit the Categories definition: Add Bug to the Task Category and remove it from the Requirements Category.

no problem(surprised!!).next step:

3-Edit the process configuration definition: Map the Resolved state for the Task Category and remove it from the Requirements Category.

here comes trouble!as soon as u cross the second step you have to correct the process configuration file otherwise you cannot even implement the current version(must be cause of dependency that exist between these files).MSDN said ( Map the Resolved state for the Task Category) first of all there is no state named RESOLVED anymore in this version.(you can find the states of every item in their own config file for example states of BUG is in it`s own XML and are listed like this

<STATES> <STATE value="Done"> <FIELDS> <FIELD refname="Microsoft.VSTS.Scheduling.Effort"> <READONLY /> </FIELD> </FIELDS> </STATE> <STATE value="Removed" /> <STATE value="New"> <FIELDS> <FIELD refname="Microsoft.VSTS.Common.ClosedDate"> <EMPTY /> </FIELD> </FIELDS> </STATE> <STATE value="Approved"> <FIELDS> <FIELD refname="Microsoft.VSTS.Common.ClosedDate"> <EMPTY /> </FIELD> </FIELDS> </STATE> <STATE value="Committed"> <FIELDS> <FIELD refname="Microsoft.VSTS.Common.ClosedDate"> <EMPTY /> </FIELD> </FIELDS> </STATE> </STATES> ) and here is the current values:

    <States>
  <State type="Proposed" value="To Do" />
  <State type="InProgress" value="In Progress" />
  <State type="Complete" value="Done" />
</States>

it was the last step but i can`t go any further.i replaced RESOLVED by Committed or even Approved but there is always an error like:

TaskBacklog/States. TF400536: This element defines the states for work items that appear on your backlog. The initial state value for each work item type must match one of the states defined in this element. The following work item types have an initial state that is not included in the defined states: 'Bug'.

and depend of the items in the state part(sometimes i just put NEW & Done) the same error occurred this time for 'Task'

any similar attempt!?did anyone did such a thing before or any hint!?

2

2 Answers

1
votes

Ok.solve it finally!it seems in the new templates Resolved become committed as i said earlier.so this time i didn`t replace the Original code by MSDN. this time i merged the codes so it becomes:

  <State type="Proposed" value="To Do" />
  <State type="Proposed" value="New" />
  <State type="Proposed" value="Approved" />
  <State type="InProgress" value="In Progress" />
  <State type="InProgress" value="Committed" />
  <State type="Complete" value="Done" />

and i can upload my own template without any error!!

0
votes

You must be using the Scrum template and not the Agile template. In the Agile template bugs are tasks already. While I consider bugs as tasks to be an anti-pattern for agile teams you can configure it by:

  1. Copying the workflow section from the Task work item and replacing the Bug workflow with it.
  2. Adding the fields a task requires: Remaining work

Upload your new Bug.

Then update the categories to remove Bug from "BacklogItems" and add it to "TaskCategory". This should got it done for you.