Add type definitions for work item categories to a process template

Visual Studio Team Foundation Server 2013

You can add categories to your process template. A category associates a group label with one or more types of work items. Categories are useful when your team projects contain similar work item types that are named differently. You specify the category definitions in one file, and then you specify that file to upload within the taskxml element of the WorkItemTracking plug-in.

The Team Foundation Server (TFS) process templates define over ten categories that are used to support Agile planning tools, test case management, and other features. You can customize or create a category definition file. For the MSF process templates, the category file is defined in the WorkItem Tracking folder. For more information, see Use categories to group work item types.

After a team project is created from the process template, you can export and import categories for a team project collection by using the witadmin command-line tool. For more information, see Import and export categories [witadmin].

Define categories

The file that defines the categories must conform to the schema definition for categories, defined in the categories-01.xsd file, and must be specified in its own file in the WITD container element.

The following example shows the syntax structure that defines a category that is named Requirement Category and that is associated with the User Story work item type.

 Copy imageCopy Code
<CATEGORIES>
   <CATEGORY refname="Microsoft.RequirementCategory" name="Requirement Category">
      <DEFAULTWORKITEMTYPE name="User Story" />
   </CATEGORY>
   . . . 
</CATEGORIES>

Specify a category definition file to upload

To upload a set of category definitions, you specify the CATEGORIES element within the taskxml element. The filename attribute is a relative path of the category definition file. For example, the following syntax specifies that the categories.xml file will be uploaded.

 Copy imageCopy Code
<CATEGORIES fileName="WorkItem Tracking\categories.xml" />

The following example shows how to specify a task that uploads a categories file. Because each category specifies a default work item type, the task to upload the category definition file depends on the successful completion of the WITs task which uploads the type definitions for work items.

 Copy imageCopy Code
<task id="Categories" name="Categories definitions" plugin="Microsoft.ProjectCreationWizard.WorkItemTracking" completionMessage="Work item type categories created">
   <dependencies>
      <dependency taskId="WITs" />
   </dependencies>
   <taskXml>
      <CATEGORIES fileName="WorkItem Tracking\Categories.xml" />
   </taskXml>
</task>

CATEGORIES element reference

The following table describes the CATEGORIES element that you use to upload the category definition file. You specify this element within a taskXml container element in the WorkItemTracking plug-in file.

NoteNote

You specify a definition file to upload using the CATEGORIES (WorkItemTracking) element. You specify the set of categories to define using the CATEGORIES (Definition) element.

Element

Syntax

Description

CATEGORIES

 Copy imageCopy Code
<CATEGORIES fileName="CategoriesFilePathName" />

Optional child element of the WorkItemTracking plug-in.

Specifies the path and name of the file that contains the category definitions to be uploaded when the WorkItemTracking plug-in task is processed.

See Also

Reference

Import and export categories [witadmin]

Concepts