ARTICLE :
 

Customize Team Foundation Server (TFS) 2010 Work Item Type

by SBajra on October 7th, 2012

Introduction

Team Foundation Server (TFS) 2010 out of the box comes with CMMI templates and Agile templates for working with work items. Most of the templates fulfill well enough for the purpose. However, sometime we may need to add extra field to some of the templates. This article explains how we can customize existing TFS work item type (template).

Background

We use TFS 2010 for all our documentation but we also use JIRA (which is another 3rd party application) for issue tracking. There was no easy way to link TFS issue with JIRA issue. So, I had to customize TFS Work Item Type (template) to include JIRA number. In this article I will be demonstrating how we can customize TFS Work item types to add new field.

Detail

The easiest way to customize TFS work item type is to use TFS 2010 Power tools. When you install TFS 2010 Power tools, you will get extra tools in Visual Studio 2010 to edit/customize TFS work item type (template). TFS 2010 Power tools is a separate installation by Microsoft. Technically, it covers things that seem to be missed in original release of TFS 2010. TFS power tools is must have tool to work with TFS 2010.

Link to download TFS 2010 power tools:
http://visualstudiogallery.msdn.microsoft.com/c255a1e4-04ba-4f68-8f4e-cd473d6b971f/

Once you install TFS power tools, you will get new submenu "Process Editor" under Tools menu in Visual Studio 2010 IDE.

In this demo, we will be customizing TFS CMMI "Bug" Work Item Type to include new field called JIRA Number.

To edit/customize the Work Item Type (WIT), perform following steps:
1) In Visual Studio 2010, Click Tools menu>Process Editor>Work Item Types>Open WIT from Server.


2) Then you will be prompted to choose the TFS server.


3) Select TFS server and select the Team Project Collection and click "Connect" button.

4) Then you will get list of Team Projects.
Select the team project for which you want to customize/edit Work Item Type (WIT)
Select the Work Item Type (WIT). In our example, I will choose "Bug" work item.
and click "OK"


5) Then you will a screen in Visual Studio 2010 to add new field or edit existing field to Work Item Type.


6) Click on "New" button to create new field for "Bug" Work Item Type.

7) Then you will get a dialog popup box to enter new field information.


8) Enter Name of new field, select the type and enter Reference Name. Reference Name should be unique which is used by TFS internally. Name is for display purpose only.
Then click "OK"

9) You should be able to see the new field called "Jira Number" being added.


10) Now let's add the new field "Jira Number" to the Bug work item user interface.
Click on "Layout" tab and then create "New Control" for the Bug work item UI. For this demo, I will be added new control under "Classification" group.


11) Enter properties for the new control like Field Name, Label etc.


12) Once the field property information is entered, click "Preview Form" button to see how it will look in UI.


13) You will see the preview with new "Jira Number" field being added to "Classification" group.


14) If you are fine with the new field being added to your Bug Work Item in preview then save the changes by clicking "" or click File menu>Save


15) Now, you have your customized new field in Bug Work Item.

Conclusion

This is simple demo on how we can easily customize TFS work item using TFS power tools.

Author:

Profile Photo
SBajra
Date: October 7th, 2012

Comments:



Profile Photo
Commented by Tommy Yang
on January 13th, 2014 at 20:44:35 EST
hi SBajra
I have add the new field successfully follow your's example. This is very helpful.
and I still have one more question, how can I add a downlist to my created field?
I need provide some values to let user select.
hoping your reply.