Export (0) Print
Expand All

Support Bug Update Status Using My Work

If you have customized the workflow states for work item types that you use to track bugs, you may need to update the metastate associations made for the process configuration. In addition to how these associations are used for the backlog and task board pages, they also control how the My Work feature in Team Explorer updates the bug state as developers move bugs within the My Work interface. The My Work page in Team Explorer 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 work item types that you use to track bugs in the definition for the Bug Category, and you assign metatstates to workflow states in the definition for CommonConfiguration. Changes that you make to the definition files apply for all teams that work in the team project that you customize.

Note Note

This customization is only valid for team projects that are based on the process templates for Microsoft Solutions Framework (MSF) Agile or Capability Maturity Model Integration (CMMI).

In this topic

Requirements

  • To access My Work, you must have Visual Studio Premium or Visual Studio Ultimate installed.

  • 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 Team Foundation Server Permissions.

The following table lists the default metastates assigned to the bug workflow states for the default process templates for Visual Studio Application Lifecycle Management (ALM): MSF for Agile Software Development v6.0 and MSF for CMMI Process Improvement v6.0. 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.

MSF for Agile Software Development v6.0

MSF for CMMI Process Improvement v6.0

<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>

Back to top

You add types of work items to a category by updating the categories definition file and importing it for your team project.

  1. To run the witadmin command-line tool, 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)%.

  2. Type the following command, substituting 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 press 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"
    

For more information, see Define Categories to Group Work Item Types.

Back to top

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

  1. From the Command Prompt window for witadmin, type the following command substituting 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 press Enter.

    witadmin exportcommonprocessconfig /collection:CollectionURL /p:ProjectName /f:"DirectoryPath\CommonConfiguration.xml"
    
  2. Open CommonConfigurations 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. Type the following command to import the definition file:

    witadmin importcommonprocessconfig /collection:CollectionURL /p:ProjectName /f:"DirectoryPath\CommonConfiguration.xml"
    

Back to top

Show:
© 2014 Microsoft