Customizing Work Items in Visual Studio

Customizing Work Item Types in Team System isn't quite as easy as it should be, but it's not difficult.

The Work Items are actually XML. To export them, you use the command line utilities witimport and witexport, which are located in the C:\Program Files\Microsoft Visual Studio 8\Common7\IDE path by default.

Here's how to export all 5 standard MSF Agile work item types (Bug, Task, Scenario, Quality of Service, and Risk):

witexport /f c:\task.xml /t %tfs% /p demo /n Task
witexport /f c:\bug.xml /t %tfs% /p demo /n Bug
witexport /f c:\scenario.xml /t %tfs% /p demo /n Scenario
witexport /f c:\risk.xml /t %tfs% /p demo /n Risk
witexport /f c:\qos.xml /t %tfs% /p demo /n "Quality of Service Requirement"

I created two little batch files which automate the process of exporting and importing all 5 standard Work Item Types from the MSF Agile template. You can download them here:

Rename the files from .txt to .bat, and edit the path and TFS server name variables to match your environment.

Once you download the work item type XML files, you'll need to edit the resulting XML files to make whatever changes you need in the Work Items. There's some good guidance at MSDN on making common Work Item Type edits:

But editing raw XML still isn't my idea of a good time. You can make the experience slightly more pleasurable by adding IntelliSense to Visual Studio 2005 for Work Item Type XML. Rob Caron describes how. It's quite easy.

  1. Download the process template schemas from the MSDN help topic Process Template Schemas Download.
  2. extract the contents to: %ProgramFiles%\Microsoft Visual Studio 8\Xml\Schemas

After you copy the schemas to the right place, restart the IDE and you'll discover some shiny new IntelliSense when you begin editing the Work Item XML:

Once you're done making edits, validate your changes to make sure you didn't break anything.

witimport /f c:\task.xml /t %tfs% /p demo /v

Then, if you're happy with the validation results, remove the /v flag to import the work item.

witimport /f c:\task.xml /t %tfs% /p demo

And you're done! Wasn't that easy? OK, I wouldn't call it easy, but it's not too painful.

If you want something even easier, like a full-blown GUI tool to edit Work Item Types, you might want to check out the VSTS Customization Toolkit. It has some quirks, but it has worked fairly well the few times I've tried it. And it definitely beats editing raw XML.

posted on Tuesday, January 30, 2007 5:19 PM by jatwood

Comments

# re: Customizing Work Items in Visual Studio

Thank you for provided descriptions. It was useful for me)

----------------------------------------
<a href="http://video-editing-software.downloadsoftware4free.com/">Professional movie editing software</a>
Wednesday, July 25, 2007 6:14 AM by clyopa