3rd
JUN

How to customize an existing process template in TFS?

Posted by S Singh under Software Development Practices

In my last post “Process Implementation and TFS(Team Foundation Server)- Part1” I spoke about editing the process template using TFS process template manager. The limitation with this approach is that it commits the changes at the template level which can only be seen in the new project. So, in other words the existing projects using that template would not see the changes.

 This leaves us with the question – how do we customize our process templates to see the changes in the existing projects. Here is a step by step guide to do this:

 Problem:

 Scenario: Suppose I have a team project named “test” which is using TFS-CMMI process improvement template. Due to my current project needs I need to modify the work item Type-“issue” to support an additional state “Awaiting business feedback”-this is to clearly identify all the items that are waiting for customer’s feedback before closure.

The flow would be something like this:

Existing flow:

Propose->Active->Resolved-> closed 

New Flow:

Propose->Active->Resolved-> Awaiting Business feedback->closed 

Solution:

This can be achieved in two ways: 

  • Command line Route: Microsoft has provided some command line tools to help with this process. Using witexport you can export a single work item definition file for a specific team project, modify it, and then use witimport to import the modified work item definition into the process template.         

            Step 1:

Make sure the path for the above two command line utilities is in your system environment variable. Otherwise you will have to traverse to the following location to execute these commands: <drive >\Program Files\Visual Studio8\Common7\IDE

TFS Process Template

Step 2:

Open command line screen and execute the following command: 

witexport [/f Workitem export path/Name] /t [TFS Server] /p [teamproject] /n [workitem name] 

In my case it will be: witexport /f c:\\ ProcessTemplates\issue.xml /t silpunappdev6 /p test /n Issue

TFS Process Template

TFS Process Template

Step 3: 

Open Issue.xml in Visual Studio 2008/2005 with TFS process template editor. It will automatically create an issue.wit in “c:\processTemplates”. WIT extension stands for work item type. This is how the file will look like once opened in Visual studio 2008.

TFS Process Template

Step 4:

To achieve the required customization. I will have to add a new State-“Awaiting customer Feedback” and three new transitions: a) Resolved to Awaiting customer feedback b) Awaiting customer feedback to Closed c) Awaiting customer feedback to Active (In case of rework) Please refer to my earlier post “Process Implementation and TFS(Team Foundation Server)- Part1” for more details about “State and Transitions”.

  • Add a new State-“Awaiting Customer feedback” by dragging and dropping the state object from left tool bar on the Workflow tab of issue.wit
  • Rename the state to “Awaiting Customer feedback” by double clicking on state object. Please refer to the following figure: 

TFS Process Template

Add Transitions:

    • Select Transition link on the left tool bar and create a link between resolved and awaiting customer feedback state objects by clicking on them. 

Transition Details: 

  1. Resolved ->Awaiting Customer feedback. Please refer to the following figures:
    • Double click on transition object and add a reason for this transition as “Customer Approval Required”. Refer to the following figure(s):

TFS Process Template

TFS Process Template

Create the remaining transitions and save the changes. The final workflow screen will look like this:

TFS Process Template

 

 

 

The author is a seasoned project manager at Silicus Technologies (An Offshore Software Development Company) and has lead several large scale software development projects for e-Commerce, CRM and Business Process Management solutions across multiple industries.

 

Step 5:

After making all the changes to the work item type. Import the issue.xml using the following command line utility. 

Witimport /f [filename] /t [tfs Server] /p [teamproject]  

In my case: Witimport /f c:\\ProcessTemplates\\issue.xml /t silpunappdev6 /p test 

This was the last step required to implement the customization. No you should be able to create an issue with “Awaiting customer feedback” state in your existing ‘test’ project.

In the beginning I mentioned that there are two ways to do this. Actually if we look at it the real difference between the two approaches is in the way we export and import the workitem type xml file. One is using the Command line utility (witexport and witimport) the other approach is through visual studio IDE. Please refer to the snapshot below. The WIT editing part is the same in both the cases. 

 

TFS Process Template

  About the Author

The author is a seasoned project manager at Silicus Technologies (An Offshore Software Development Company) and has lead several large scale software development projects for e-Commerce, CRM and Business Process Management solutions across multiple industries.

Reader's Comments

  1. Blues001 |

    Can we have a look at the template

  2. TFSIssue |

    So how do you handle the issue with removing a state or changing the name of a state? They seem to merge the old state transitions and states with the new ones.

Leave a Reply