Saturday, April 2, 2016

TFS Work Item Customization using TFS Power Tool: Part 4

Hi All,
Hope you all read and worked on my previous blogs on TFS work item customization using TFS power tool.

In this post we will see, how we can “add new tab for Task work item type”, with one link control which will allow you to create or link only bugs as related item.
Main goal is to understand the link control of TFS work item and how we can specify what work item type can be linked based on our project needs. Let’s walkthrough the entire procedure.
Open Visual Studio, and Click on TOOLS -> Process Editor-> Work Item Types-> Open WIT from server, to open the template online (and edit directly on Server).



Now connect to the TFS and then to the Team Project under the Team Project Collection. Here I am connecting to a Team Project collection called Awesome Collection. Click on connect. The page will display list of Team projects under that collection.

I will select “Awesome” Team Project, click on (+) symbol and expand. Select work item type Task (can be any other work item type you want to modify)

 
Task work item type will opened in Visual Studio. It will have 3 Tabs namely
1.      Fields - which contains work item filed information.
2.      Layout - which contains UI information of work item
3.      And Workflow - which contains States and Transitions.
Click on the Layout Tab.

You can make use of “Preview Form” button to check how the work item UI looks and decide where to place the new tab in the work item template UI.

Let us see how to add the new tab “RELATED BUGS” after the IMPLEMENTATION tab as shown below.

To create new tab we can make use of existing Tab Group or we can create new Tab Group. Since we are using the existing Tab Group, let us create a new Tab Page named “Related Bugs”.


Right click on the Tab Group above Tab Page - Description and select “New Tab Page” from context menu.

At right side, enter label as “Related Bugs”

Now right click on the newly created Tab and select ‘New Control’.

Give control properties as below,
Name    : Related Bugs
Type      : LinksControl

Click on the Control Settings to give more settings for the link control.



Check all filters and give the setting as shown below.
1.      In Work Item Type Filters we are mentioning include only “Bug” work item type.
2.      In Work Item Link Filters we are mentioning include only “Related” link type rest are excluded.
3.      In External Link Filters we are mentioning “Exclude All” External Links such as a Changeset, hyperlink, and version control item etc.

Click on OK button.
Now the task template is ready to save and you can also preview the changes using Preview Form option in the Layout tab.


Once confirmed close the Preview window and save the changes to server. And below is how the template looks like after the changes.




Now try creating a new linked item, using ‘New’ option in the Related Bugs tab, in Add new linked work item to task window you will see that there is only one work item type supported, i.e. Bug and only one Link type is supported i.e. ‘Related’

Also, when we try to link existing work items you will see that only “Related” link type is supported and only Bug work item can be linked.
This is how we can easily customize TFS work item template using power tool.
Hope you all enjoyed this, feel free for any suggestions.

Thanks for reading this post.

No comments:
Write comments