Support bug update status using My Work
VSTS (Hosted XML) | TFS 2018 | TFS 2017 | TFS 2015 | TFS 2013
This topic applies to team project customization for Hosted XML and On-premises XML process models. For the Inheritance process model, see Customize a process. For an overview of process models, see Customize your work tracking experience.
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 a Developer: Suspend work, fix a bug, and conduct a code review.
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.
To access My Work, you must use Team Foundation Version Control (TFVC) 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 Add an administrator.
Default metastate assignments made to workflow states for bugs
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.
<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>
Add WITs to the Bug category
Open the categories file in Notepad and locate the
CATEGORYelement for the
To add a new type of work item, add a
WORKITEMTYPEelement 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>
Import the modified definition file.
witadmin importcategories /collection:CollectionURL /p:ProjectName /f:"DirectoryPath\categories.xml"
Assign metastates to workflow states defined for bugs
You assign metastates to the workflow states of bugs within the
BugWorkItems element in the definition for ProcessConfiguration. Follow the customization sequence that matches your process model.
Open ProcessConfigurations in Notepad and locate the
Update the values assigned to the
Stateelements to match the values used in the workflow for the types of work items that you use to track bugs.
(Optional) To add another state that is present within the workflow, specify another
Stateelement 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
<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>
You must specify a value for the
Stateelement 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
Import the modified definition file.