Adding a new Work Item type to a Project
For one of our projects, we wanted to
add a new work item type for user feedback. The standard work items in the default
Microsoft Agile process template are:
- Bug
- Quality of Service Requirement
- Risk
- Scenario
- Task
You can add these work items from the
Team menu, or by right-clicking the Work Items project node in the
Team Explorer:

In order to add a new work item template, however, you need to obtain the process template. You can do this via the
Team, Team Foundation Server Settings, Process Template Manager dialog:

Note that you will need "Edit domain-level information" permissions to upload or download anything here. If the buttons are greyed out, that's why!
Download the template to any path you like. It's just
a bunch of files. Once you download the template files, navigate to the folder
\WorkItem Tracking\TypeDefinitions:

Make a copy of whichever work item template is closest to your needs. In our case, it's
Risk.xml.

I modified this copy slightly by changing all the descriptions to "User Feedback". Other than that simple textual change, it's identical to a Risk.
We can use the command-line utility
witimport.exe to import this work item template file to our target project. It's with all the other TFS command line utils in the
c:\program files\Microsoft Visual Studio 8\Common7\IDE folder:
Imports a work item type XML definition file into a Team Project on a Team
Foundation Server. The imported definition will overwrite any existing work
item type with the same name. If the work item type does not already exist,
a new work item type will be created.
Use:
witimport /f filename /t tfs /p teamproject [/v] [/e encodingname]
/f Specifies the work item type XML definition file to be imported.
/t Specifies the name of the Team Foundation Server. This can also be a
fully specified URL such as http://tfs:8181.
/p Specifies the Team Project on the Team Foundation Server to which the
file is imported.
/v Validates the XML without importing the work item type.
/e Specifies the name of the .NET Framework 2.0 encoding used to import
the work item type XML. For example, /e utf-7 will use Unicode
(UTF-7) encoding. Encoding is auto-detected by default where
possible. If unavailable, encoding defaults to UTF-8.
Once we've imported our work item template file, we can re-open our Team Project and successfully add a new work item of type "User Feedback":

Now if only I could figure out how to delete a work item template..