Tomas Scott's Blog

Just another Visual Studio ALM blog

Upgrading TFS 2008 Work Items to 2010 version

Today I have been working with applying new features from TFS2010 to old TFS2008 work items. The approach I have chosen is to take the Microsoft CMMI version 5 as a base, and adding fields we added in the 2008 version of the process template. Then I tried to import the new definition using the witadmin command. The first issue was due to the fact that Microsoft changed some field names adding white space. You can solve this in two ways. Either you change the name of the fields in your definition file as described in this blog post,category,Programming,TFS.aspx or you use the Witadmin changefield command to change the name of the existing fields.

Another thing that caused some confusion was when trying to import Test Case. It worked fine, but when trying to create a workitem of this type I got an error that said “Work item type is not valid. You must specify a valid work item type.”

Really strange since when importing the workitemtype the workitem type was valid! So I started to search the web and found a hint about the new concept about Categories. So I first imported the categories and tried to create a test case again. But no – it did not work. I had to import the Test case Wit again before it worked. So I found some kind of “catch 22” syndrome here, that since you cannot import categories before the workitem type exists, and the workitem does not work until the categories have been imported. So this is what you need to do (omitted some parameters – collection and project)

1 – witadmin witimport testcase.xml
2 – witadmin importcategories categories.xml
3 – witadmin witimport testcase.xml

Remember that you need to refresh the project if you have Team Explorer opened. If you encounter strange errors it can be the cache that is corrupted. Delete the cache folder in c:\documents and settings\<your username>\Local Settings\Application Data\TeamFoundation\3.0

Good luck!


October 22, 2010 Posted by | TFS | Leave a comment