Migrate a TFS project to another process template.

Back in 2011, 4 years ago I wrote a blog post called “Manual upgrade a TFS project to a new Process template”. Since then I have got some questions and feedback and now it’s time for an updated version based on the latest process templates in TFS 2015, this time from Agile to Scrum.

  1. Start with downloading the process template you want to upgrade to, to disk with the process template manager, for example to D:\MyDownloadedTemplate

2. Backup your old work item types in the TFS project you want to upgrade in case you need to do a rollback. Use the process template editor in Team Foundation Power Tools or from a Visual Studio command prompt with Witadmin.exe.

MD “C:\Temp\MyWorkItemBackup”

CD C:\Temp\MyWorkItemBackup

witadmin.exe exportwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /n:Bug /f:”Bug.xml”

witadmin.exe exportwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /n:Task /f:”Task.xml”

witadmin.exe exportwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /n:”User Story” /f:”UserStory.xml”

witadmin.exe exportwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /n:Issue /f:”Issue.xml”

witadmin.exe exportwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /n:”Test Case” /f:”TestCase.xml”

3. If you have custom fields, add them to the downloaded process template with the process template editor.

4. Some work item types have different names in Scrum and Agile; because of this you first have change the name in the new template to the name of the work item type in the old template, Impediment to Issue and Product Backlog Item to User Story.

5. Upload the Work Item types from the new template to your project with Witadmin.exe from the Visual Studio command prompt.

CD C:\MyDownloadedTemplate\Scrum\WorkItem Tracking\TypeDefinitions

Witadmin.exe importwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /f:”ProductBacklogItem.xml”

witadmin.exe importwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /f:”Task.xml”

witadmin.exe importwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /f:”Bug.xml”

witadmin.exe importwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /f:”TestCase.xml”

witadmin.exe importwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /f:”CodeReviewRequest.xml”

witadmin.exe importwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /f:”CodeReviewResponse.xml”

witadmin.exe importwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /f:”FeedbackRequest.xml”

witadmin.exe importwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /f:”FeedBackResponse.xml”

witadmin.exe importwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /f:”SharedStep.xml”

witadmin.exe importwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /f:”Feature.xml”

witadmin.exe importwitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /f:”Impediment.xml”

6. Rename Issue and User Story to Impediment and Product Backlog Item

witadmin.exe renamewitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /n:”Issue” /new:”Impediment”

witadmin.exe renamewitd /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /n:”User Story” /new:”Product Backlog Item”

7. Upload the categories.xml

CD C:\MyDownloadedTemplate\Scrum\WorkItem Tracking

witadmin.exe importcategories /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /f:”Categories.xml”

8. Upload the ProcessConfiguration.xm

CD C:\MyDownloadedTemplate\Scrum\WorkItem Tracking\Process

witadmin.exe importprocessconfig /collection:http://MyTFS:8080/tfs/MyCollection /p:”Demo-Agile” /f:”ProcessConfiguration.xml”

9. If you want the queries associated with a Scrum project copy them from an existing project.

10. Remove your old reports from your project from the project report page and use tfpt.exe from Team Foundation Power Tools to create new reports.

tfpt addprojectreports /collection:http://MyTFS:8080/tfs/MyCollection /teamproject:”Demo-Agile” /processtemplate:”Scrum” /force