Support bug update status using My Work

With My Work in Team Explorer you can conduct and respond to code reviews. If you have customized the workflow states for work item types (WITs) that you use to track bugs, you may need to update the process configuration state-to-metastate mappings. My Work uses these mappings to update the bug state as developers update the bug status using My Work. My Work allows developers to manage their work in progress, suspend and resume work, and request code reviews. See Day in the life of an ALM Developer: Write new code for a user story.

You specify all the WITs that you use to track bugs in the definition for the Bug Category, and you define state-to-metatstates mappings in the ProcessConfiguration. Changes that you make to the definition files apply for all teams that work in the team project that you customize.

Requirements

  • To access My Work, you must have Visual Studio Enterprise installed and use Team Foundation Version Control for your source control.

  • To run the witadmin command-line tool, you must be a member of the Team Foundation Administrators group or a member of the Project Administrators group for the team project. For more information, see Pernission reference for Team Foundation Server.

The following table lists the default metastates assigned to the bug workflow states for the Agile and CMMI process templates. You only need to assign a metastate to a workflow state that you want to show up on the task board or for My Work to recognize. The default assignments include the typical workflow progression from Active or Proposed to Closed. If your bugs contain workflow states outside this progression, such as a Removed state, then you exclude those states in your metastate assignments.

Agile

CMMI

<BugWorkItems category="Microsoft.BugCategory">
   <States>
      <State value="Active" type="InProgress" />
      <State value="Resolved" type="Resolved" />
      <State value="Closed" type="Complete" />
   </States> 
</BugWorkItems>
<BugWorkItems category="Microsoft.BugCategory">
   <States>
      <State value="Proposed" type="Proposed" />
      <State value="Active" type="InProgress" />
      <State value="Resolved" type="Resolved" />
      <State value="Closed" type="Complete" />
   </States> 
</BugWorkItems>

You add WITs to a category by updating the Categories definition file and importing it to your team project.

  1. To run the witadmin command-line tool, open a Command Prompt window where either Visual Studio or Team Explore is installed and enter:

    cd %programfiles%\Microsoft Visual Studio 14.0\Common7\IDE
    

    On a 64-bit edition of Windows, replace %programfiles% with %programfiles(x86)%.

  2. Type the following command, and substitute your data for the arguments that are shown here, where CollectionURL specifies the URL of a team project collection, ProjectName specifies the name of a team project defined within the collection, and DirectoryPath specifies the name and location for the file to export. Then choose Enter.

    witadmin exportcategories /collection:CollectionURL /p:ProjectName /f:"DirectoryPath\categories.xml"
    
  3. Open the categories file in Notepad and locate the CATEGORY element for the "Bug Category".

  4. To add a new type of work item, add a WORKITEMTYPE element that specifies the reference name of a work item type that you want to add.

    For example, the following syntax adds the work item type of "Performance Bug" to the bug category.

    <CATEGORY name="Bug Category" refname="Microsoft.BugCategory">
       <DEFAULTWORKITEMTYPE name="Bug" />
       <WORKITEMTYPE name="Performance Bug" />
    </CATEGORY>
    
  5. Type the following command to import the definition file:

    witadmin importcategories /collection:CollectionURL /p:ProjectName /f:"DirectoryPath\categories.xml"
    

You assign metastates to the workflow states of bugs within the BugWorkItems element in the definition for ProcessConfiguration.

  1. From the Command Prompt window for witadmin, type the following command and substitute your data for the arguments that are shown here, where CollectionURL specifies the URL of a team project collection, ProjectName specifies the name of a team project defined within the collection, and DirectoryPath specifies the name and location for the file to export. Then choose Enter.

    witadmin exportprocessconfig /collection:CollectionURL /p:ProjectName /f:"DirectoryPath\ProcessConfiguration.xml"
    
  2. Open ProcessConfigurations in Notepad and locate the BugWorkItems element.

  3. Update the values assigned to the State elements to match the values used in the workflow for the types of work items that you use to track bugs.

  4. (Optional) To add another state that is present within the workflow, specify another State element that maps to the workflow state of the work item type included within the Bug Category.

    For example, the following syntax adds the state value of "Investigating", to "inProgress".

    <BugWorkItems category="Microsoft.BugCategory">
       <States>
          <State value="Active" type="InProgress" />
          <State value="Investigating" type="InProgress" />
          <State value="Resolved" type="Resolved" />
          <State value="Closed" type="Complete" />
       </States>
    </BugWorkItems>
    
    Important noteImportant

    You must specify a value for the State element that corresponds to a valid workflow state. A valid workflow state is one that has been defined for a work item type that is included in Bug Category for your team project. Also, you must assign a metastate type within the Agile or Bug group, that is Proposed, InProgress, Resolved, or Complete.

  5. Import the definition file:

    witadmin importprocessconfig /collection:CollectionURL /p:ProjectName /f:"DirectoryPath\ProcessConfiguration.xml"
    
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft