Create a Category for Types of Work Items
Collapse the table of content
Expand the table of content

Create a Category for Types of Work Items

Visual Studio 2010

You can create categories to group and manage related types of work items. A category is a container for one or more work item types that you want to use for tracking, query, or reporting purposes.

Categories are specified in an XML file that you can import to Team Foundation Server for use with a specific team project. Before you create a category, you can review how categories are used. For more information, see Working with Work Item Type Categories.

Required Permissions

To create a category, you must be a member of the Team Foundation Administrators security group or the Project Administrators security group. To export the categories XML file, you must have your permissions set to connect to Team Foundation Server. For more information, see Team Foundation Server Permissions.

NoteNote

Even if you log on with administrative permissions, you must open an elevated Command Prompt window to perform this function on a server that is running either Windows Vista or Windows Server 2008. To open an elevated Command Prompt window, click Start, right-click Command Prompt, and then click Run as Administrator. For more information, see the Microsoft Web site: User Account Control.

To create a category

  1. In Visual Studio, create an XML file for your category by pointing to the File menu, clicking New, and then clicking File.

  2. In the New File dialog box, under Categories, select General, and then under Templates, select XML File.

  3. Copy and paste the following code into the file:

    <?xml version="1.0" encoding="utf-8" ?> 
    <CATEGORIES>
       <CATEGORY name="Category Display Name" refname="Category Name">
          <DEFAULTWORKITEMTYPE name=" name of default work item type"/>
          <WORKITEMTYPE name="work item type name 1" />
          <WORKITEMTYPE name="work item type name 2" />
          <WORKITEMTYPE name="work item type name n" />
       </CATEGORY>
    </CATEGORIES>
    

    For more information about each of these elements and attributes, see Categories Definition Schema Reference.

    You must specify a unique name in the team project for the category display name and the reference name. Friendly names must be between 1 and 128 characters, and reference names must be between 1 and 254 characters. For more information, see Naming Conventions for Work Item Tracking Objects.

  4. Specify the name of the default work item type.

  5. (Optional) Specify the names of the work item types that you want to associate with the category.

  6. (Optional) Define additional categories by copying the <CATEGORY> group of elements provided in step 3 and repeating steps 4 and 5.

  7. Save the changes by clicking Save on the toolbar. In the Save File As dialog box, type the name of the file, and save it as an .xml file.

  8. To import the category to your team project, type the witadmin command that uses the following syntax, and then press ENTER:

    witadmin importcategories /collection:http://ServerName:Port/VirtualDirectoryName/CollectionName /p:ProjectName /f:FileName

    Specify the directory path and name of the file that you saved in step 5.

    NoteNote

    Importing the categories XML file into a project will overwrite all existing categories. Categories that were previously defined but are not specified in the file will be deleted.

    For more information, see Customizing Categories for Work Item Types [witadmin].

Community Additions

ADD
Show:
© 2016 Microsoft