This documentation is archived and is not being maintained.

Add Type Definitions for Work Items to a Process Template

Updated: April 2011

The work item types that you define for a process template provide the foundation for all tracking, monitoring, and reporting on the development of a product and its features. A work item type defines the data fields, the workflow, and the work item form for an item of work that will be tracked in a team project. Types of work items include bugs, user stories, and tasks. You can first customize the type definitions to add fields, change the workflow, or modify the work item form. Also, you can add or remove types of work items from a process template.

You specify the type definitions for a process template for several work items as a task within the WorkItemTracking plug-in. This task is required because work item types support tracking and reporting work. You specify each type definition file to upload within the taskXml element. The plug-ins for test management, reports, and the portal depend on the successful upload of the type definitions for work items.

Important noteImportant

The process templates for Microsoft Solutions Framework (MSF) v5.0 define six or more types of work items. The types and the fields that are defined within them are referenced in the definitions of categories, work item queries, and reports. Therefore, the task to upload the type definitions for work item types must successfully complete before the tasks to upload categories, work item queries, and reports.

Also, the task to upload the definition files for link types must precede the task to upload the type definitions for work items. For more information, see Defining Dependencies for Task Groups and Tasks in Plug-in Files.

In this topic

After a team project is created by using the process template, you can add, remove, rename, and change the type definitions of work items by using the witadmin command-line tool. For more information, see Customizing and Managing Work Item Types [witadmin].

Each type definition must be specified in its own file in the WITD container element. Each definition must also conform to the schema definition for work item types, which is defined in the workitemtypedefinition-02.xsd and workitemtypedefinition-02.xsd files. You can download the schema files for tracking work items from the following page on the Microsoft website: Process Template and Work Item Schemas for Visual Studio Team Foundation.

The following example shows the high-level syntax structure that defines a work item type.

<WITD application="work item type editor" version="1.0">
    <WORKITEMTYPE name="Bug">
        <DESCRIPTION>Bug work items are used to track defects in the code.</DESCRIPTION>
        <FIELDS> . . . </FIELDS>
        <WORKFLOW> . . . </WORKFLOW>
        <FORM> . . . </FORM>

You can customize or create type definition files in the TypeDefinitions folder. For more information about how to define a type of work item, see All WITD XML Elements Reference and Customizing Project Tracking Data, Forms, Workflow, and Other Objects.

Back to top

To upload a type definition for a work item in the process template, you specify the WORKITEMTYPE element. The filename attribute is a relative path of the type definition file. For example, the following syntax specifies that the Bug.xml file will be uploaded.

<WORKITEMTYPE fileName="WorkItem Tracking\TypeDefinitions\filename.xml"/>

The following example shows how to specify a task that creates all six work item types in the process template for Microsoft Solutions Framework (MSF) for Agile Software Development v5.0. These types correspond to the following types of work items: bug, issue, shared steps, task, test case, and user story. Because the type definitions for several work items contain filters for the TestedBy link type, the LinkTypes task must be completed before the WITs task can be completed.

<task id="WITs" name="WorkItemType definitions" plugin="Microsoft.ProjectCreationWizard.WorkItemTracking" completionMessage="Work item types created">
      <dependency taskId="LinkTypes" />
        <WORKITEMTYPE fileName="WorkItem Tracking\TypeDefinitions\Bug.xml" />
        <WORKITEMTYPE fileName="WorkItem Tracking\TypeDefinitions\Issue.xml" />
        <WORKITEMTYPE fileName="WorkItem Tracking\TypeDefinitions\SharedStep.xml" />
        <WORKITEMTYPE fileName="WorkItem Tracking\TypeDefinitions\Task.xml" />
        <WORKITEMTYPE fileName="WorkItem Tracking\TypeDefinitions\TestCase.xml" />
        <WORKITEMTYPE fileName="WorkItem Tracking\TypeDefinitions\UserStory.xml" />

Back to top

The following table describes the elements that you use to upload the type definitions for work items. You specify these elements within a taskXml container element in the WorkItemTracking plug-in file.


By using the WORKITEMTYPE (WorkItemTracking) element, you specify a type definition file to upload. By using the WORKITEMTYPE (WITD) element, you specify the name of a type to define. For more information, see All WITD XML Elements Reference.





<WORKITEMTYPE fileName="WITFilePathName" />

Required child element of WORKITEMTYPES.

Specifies the path and name of the file that contains a type definition to upload.


 . . .

Required child element of the WorkItemTracking plug-in.

Contains a collection of WORKITEMTYPE elements that each specify a definition file to upload.

Back to top




April 2011

Added descriptions for each WORKITEMTYPES element. Removed links to topics that have been deleted.

Information enhancement.