Adding a Discipline Type to TFS 2005 Work Item Tasks

Wednesday, February 27, 2008 by Greg Berlin

I've been using Team Foundation Server 2005 for the past 4 months or so on a winforms .net development project at work.  It's a fantastic platform for managing source code and versioning, as well as managing tasks and bugs... and today I found that it is even more customisable than I ever imagined.

I wanted to add a task for a team mate to do, which didn't fit into any of the standard Discipline types (Architecture/ Development/ Release Management/ etc)... it's a documentation task (yup, I'm lucky enough to have somebody else handle that stuff most of the time :).

A little googling and I found this post (thanks Jimmy Li for the instructions - bottom post) detailing how to do it.  For my own records, the process was as follows:

  1. In Visual Studio 2005, go to Team > Team Foundation Server Settings > Process Template Manager and download the template you wish to modify
  2. Find the folder you downloaded, and modify the type definition XML file under the folder WorkItem Tracking\TypeDefinitions. In my case the template i changed was Task.xml, and the change I made was to add the following line under the node < FIELD name="Discipline"... / >:
    < LISTITEM value="Documentation">
    Note: Don't copy the above line - i've added spaces so that it can display in the browser without being interpreted as xml
  3. At this point, you can upload the new process template to the server, whereafter future projects will have the new field (not sure where to upload to though), or...
  4. To add the new process template to an existing project, run the witimport tool on your local machine, from the following directory:
    \Program Files\Microsoft Visual Studio 8\Common7\IDE\witimport.exe
    The syntax for this tool is as follows:
    witimport /f filename /t tfs /p teamproject [/v] [/e encodingname]
    so I ran something like the following command:
    C:\Program Files\Microsoft Visual Studio 8\Common7\IDE>witimport /f /temp/task.xml /t dev-teamfound /p hcbs_viii
    Note: To get an explanation of the syntax, just type witimport without any parameters
  5. All tasks created from then on in the hcbs_viii project contain the new "Development" discipline... phew, now i can assign those tasks to somebody else :)

Looking over that Tasks.xml template file, it seems alot more than just Disciplines can be changed... In fact it seems like a whole new template can be created to match the requirements of your team and your project.  I always knew TFS was a powerful tool, but now that I've started to scratch the surface of it a bit, it seems some serious digging may be in order to discover more... but for now it's back to development (damn them deadlines!)

0 comment(s) for “Adding a Discipline Type to TFS 2005 Work Item Tasks”

    Leave comment:


    (not shown)


    (optional - remember http://)