Update MSF for Agile process template to use new features

Visual Studio 2012 provides support for new features, such as code review and feedback through the use of the Work Item tracking system in TFS. (You can read more about it in this article New Code Review feature in Visual Studio 2012).

However, to be able to use these features you must use a process template that supports them. If you try to access these features without upgrading the process template you get errors.

This feature can’t be used until your Team Foundation administrator has enabled it on the team project.

To use My Work to multi-task and manage your changes, you must enable the feature on the server.
Click here to enable the new features

features1
features2

The error in the verification step for configuring the team project happen because an old process template is in use.

If your current process template is MSF for Agile Software Development version 4.x then you need to follow the steps in this article: Update a Team Project Based on an MSF v4.2 Process Template.

To being able to update, you first have to download the latest version of the process template. You can do this from Visual Studio. Go to Team > Team Project Collection Settings > Process Template Manager and download the template.
updatetemplate2

After you have the process template files go ahead and update according to the steps defined in the before mentioned article. However, there is a missing command in the first step of the process. You need to change an additional system field than those mentioned in the article:

witadmin changefield /collection:CollectionURL /n:System.IterationId /name:"Iteration ID"

If you need to do this for multiple projects then you’ll have to run most of these steps for each project. So here are two batch files with commands you need to run:

  • update the Team Project collection (run only once):
    SET CollectionURL=http://tfspath:port/tfs/DefaultCollection
    
    witadmin changefield /collection:%CollectionURL% /n:System.IterationId /name:"Iteration ID"
    witadmin changefield /collection:%CollectionURL% /n:System.AreaId /name:"Area Id"
    witadmin changefield /collection:%CollectionURL% /n:System.IterationID /name:"Iteration ID"
    witadmin changefield /collection:%CollectionURL% /n:System.AttachedFileCount /name:"Attached File Count"
    witadmin changefield /collection:%CollectionURL% /n:System.ExternalLinkCount /name:"External Link Count"
    witadmin changefield /collection:%CollectionURL% /n:System.HyperLinkCount /name:"Hyperlink Count"
    witadmin changefield /collection:%CollectionURL% /n:System.RelatedLinkCount /name:"Related Link Count"
    
    witadmin importlinktype /collection:%CollectionURL% /f:"TemplateDir\WorkItem Tracking\LinkTypes\TestedBy.xml"
    witadmin importlinktype /collection:%CollectionURL% /f:"TemplateDir\WorkItem Tracking\LinkTypes\SharedStep.xml"

    Note: Make sure you set the correct URL to your collection and replace TemplateDir with the actual path of the process template that you downloaded.

  • Update the Team Project (run once for each project)
    SET CollectionURL=http://tfspath:port/tfs/DefaultCollection
    
    witadmin renamewitd /collection:%CollectionURL% /p:%1 /n:Scenario /new:"User Story"
    
    witadmin importwitd /collection:%CollectionURL% /p:%1 /f:"TemplateDir\WorkItem Tracking\TypeDefinitions\Bug.xml"
    witadmin importwitd /collection:%CollectionURL% /p:%1 /f:"TemplateDir\WorkItem Tracking\TypeDefinitions\Issue.xml"
    witadmin importwitd /collection:%CollectionURL% /p:%1 /f:"TemplateDir\WorkItem Tracking\TypeDefinitions\task.xml"
    witadmin importwitd /collection:%CollectionURL% /p:%1 /f:"TemplateDir\WorkItem Tracking\TypeDefinitions\UserStory.xml"
    witadmin importwitd /collection:%CollectionURL% /p:%1 /f:"TemplateDir\WorkItem Tracking\TypeDefinitions\TestCase.xml"
    witadmin importwitd /collection:%CollectionURL% /p:%1 /f:"TemplateDir\WorkItem Tracking\TypeDefinitions\SharedStep.xml"
    witadmin importwitd /collection:%CollectionURL% /p:%1 /f:"TemplateDir\WorkItem Tracking\TypeDefinitions\Feature.xml"
    witadmin importwitd /collection:%CollectionURL% /p:%1 /f:"TemplateDir\WorkItem Tracking\TypeDefinitions\CodeReviewRequest.xml"
    witadmin importwitd /collection:%CollectionURL% /p:%1 /f:"TemplateDir\WorkItem Tracking\TypeDefinitions\CodeReviewResponse.xml"
    witadmin importwitd /collection:%CollectionURL% /p:%1 /f:"TemplateDir\WorkItem Tracking\TypeDefinitions\FeedbackRequest.xml"
    witadmin importwitd /collection:%CollectionURL% /p:%1 /f:"TemplateDir\WorkItem Tracking\TypeDefinitions\FeedbackResponse.xml"
    
    witadmin importcategories /collection:%CollectionURL% /p:%1 /f:"TemplateDir\WorkItem Tracking\categories.xml"
    
    witadmin importprocessconfig /collection:%CollectionURL% /p:%1 /f:"TemplateDir\WorkItem Tracking\Process\ProcessConfiguration.xml"

    You execute the batch passing the name of the project (in quotes if it contains spaces).

    updateproject.bat "MyCompany.MyProject"

After these commands have executed successfully you can go ahead and use the new features.
updatetemplate3

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.