If you’ve already played with work item tracking in Visual Studio Team System, then you should be familiar with the notion of work item types. For example, there are four types (Scenario, Bug, Task, and Quality of Service Requirement) in the MSF Agile methodology where each type allows users to track a different kind of work item.
Of course, you organization may have different workflow or different types of work items to track. To accommodate this variation, Team Foundation allows you to customize work item types to your content. You can add fields, rename fields, restrict the list of allowed value for fields, change the states and supported state transitions, make fields required or read-only, make one field dependent on another, automatically populate field values, re-arrange the appearance of information on the form, and much, much more! You can also start fresh and build a work item type from the ground up.
How do you get started? There are two ways.
- Edit work item types in process templates and create new team projects using the updated template
- Edit work item types in existing team projects directly
In each case, you edit XML definition files to specify the behavior of the work item type.
Process Templates for New Team Projects
When you edit work item types in a process template, every new team project you create with that template will have the updated work item type. Here’s how to do this.
- Ensure that you have “Edit domain-level information” permissions on the Team Foundation Server. This is administered via Team Explorer by right clicking the server icon and selecting Team Foundation Server Settings->Permissions.
- Follow the instructions in Amy’s “Customizing Process Templates” post to export a process template.
- Open the exported folder and go to the sub-folder where work item type definitions are stored (“MSF Agile\Currituck\TypeDefinitions” for MSF Agile in the December CTP).
- Open the XML file for the work item type that you want to edit in your favorite XML editor.
- Start editing away and make your customizations. For reference information on the definition language, check out “Authoring Work Item Types Using the December CTP.doc” in the “Work Item Type” folder of the December CTP Extensibility Kit.
- Save your changes and import the process template back onto the server by following Amy’s “Customizing Process Templates” instructions.
- Create a new project with the template and start using your customized work item type.
Work Item Types on Existing Team Projects
Once a team project is created, the only way to edit work item types in that project is to export the type directly from the project, edit it, and re-import it. These changes are scoped to the team project and won’t alter process templates or work item types in other team projects. To edit existing work item types, you must use an administrative utility to export and import the XML from the project. Step-by-step instructions are provided in “Authoring Work Item Types Lab.doc” in the “Work Item Type” folder of the December CTP Extensibility Kit. Note that for December CTP and Beta 2, you will need to be a member of the Project or Namespace Administrator group in order to import work item types. For the final release, we are planning to create a permission for administering work item types that can be granted to other non-admin groups.
Have fun customizing your work item types! Also, keep your eyes peeled for an updated Extensibility Kit containing the latest materials on work item type customization when Beta 2 comes out.
Ling Bao
Program Manager
Visual Studio Team Foundation