How to: Create a New Work Item Type
A work item type defines the rules, fields, states, and transitions for an item of work that will be tracked on a team project; such as bugs, requirements, and risks. The work item type is specified in a type definition XML file under the Work Item Tracking folder in the TypeDefinitions folder. For example, MSF for Agile Software Development defines Bug, Quality of Service, Scenario, Risk, and Task work item types in the files Bug.xml, QoS.xml, Scenario.xml, Risk.xml, and Task.xml respectively.
Customize or create new type definition files in the TypeDefinitions folder. Then you can import your new work item type to a single project or you can add it to your process template and upload the modified template to your Team Foundation Server.
Required Permissions
To perform this procedure you must be a member of the Team Foundation Administrators group or a member of the Project Administrators group for the project. For more information, see Team Foundation Server Permissions.
To create a new work item type
In Visual Studio create a new XML file for your work item type. To do this, on the File menu click New, and then click File.
In the New File dialog box, under Categories, select General, and under Templates, select XML File.
Copy and paste the following code into the file.
<?xml version="1.0" encoding="utf-8"?> <witd:WITD application="Work item type editor" version="1.0" xmlns:witd="https://schemas.microsoft.com/VisualStudio/2005/workitemtracking/typedef"> <WORKITEMTYPE name="New Work Item Type Name"> <DESCRIPTION>A description of your new work item type.</DESCRIPTION> <GLOBALLISTS> </GLOBALLISTS> <FIELDS> <FIELD name="Title" refname="System.Title" type="String" reportable="dimension"> <REQUIRED /> </FIELD> </FIELDS> <WORKFLOW> <STATES> <STATE value="Active"> </STATE> </STATES> <TRANSITIONS> <TRANSITION from="" to="Active"> <REASONS> <DEFAULTREASON value="New" /> <REASON value="Build Failure" /> </REASONS> </TRANSITION> </TRANSITIONS> </WORKFLOW> <FORM> <Layout> <Group> <Column PercentWidth="100"> <Control Type="FieldControl" FieldName="System.Title" Label="&Title:" LabelPosition="Left" /> </Column> </Group> </Layout> </FORM> </WORKITEMTYPE> </witd:WITD>
Save the changes by clicking Save on the toolbar. In the Save File As dialog box, name the file, and save it as an .xml file.
If you are creating a work item type to customize a process template, move to the location where you downloaded the process template and save your file in the \WorkItem Tracking\TypeDefinitions folder.
Note
If you are running the Windows Vista operating system, you might not have access rights to certain folders. If you try to save the work item type to a location where you do not have access rights, the registry virtualization technology automatically redirects and saves the file to the virtual store. For more information, see https://go.microsoft.com/fwlink/?LinkId=92325 and https://go.microsoft.com/fwlink/?LinkId=92323. To avoid this redirection, you can save the file in a location where you have access rights.
To customize your work item type, see Defining Work Item Type Fields, Defining Work Item Workflow, and Defining the Work Item Form.
To import the new work item type to a single project, see How to: Import a Work Item Type to an Existing Project. To add the work item type to your process template, see Work Item Types.
See Also
Tasks
How to: Import a Work Item Type to an Existing Project
Concepts
High-Level Structure of a Work Item Type