Hidden Gems in TFS 2012–Part 8 Related Work Items in a Build Report

In this series of blog posts I like to highlight some features of TFS/Visual Studio that people seem to overlook. In my day to day job I often see that people don’t know about certain feature that are available in Team Foundation Server, Visual Studio or some of the Powertools.

Some features are available as a Powertool. These can be downloaded from here

Earlier Posts

In this part……

Related Work Items in the Build Report

I discovered this Hidden Gem recently because I overlooked it. In TFS 2010 and older there was already the great feature that the build report showed all related work items. When you related a work item to your check-in, the build server automatically picked that up and displayed it.

A much heard complaint was that only the items that you related with the code were displayed. This seems logical, but many users worked on tasks, but wanted the Build report to show the parent Bug or Requirement (PBI). To achieve this, they would have to check in the parent as well. Also, the work item links were forgotten at check-in, because it happened after doing the actual work.

In 2012 things have changed. TFS 2012 is more task-centric. This means that you normally will not check-in code against a bug or PBI but against a task, and you will relate work items before you start working on the code instead of afterwards.

Let me illustrate with a small example.

Lets say I have created a Bug and assigned it to myself

image

When I look in the Team Explorer in the “My Work” section, the bug does not show. image

This is because the default setting of “My Work” only displays tasks. Read my post about changing the available work items query here.

Add a task to the Bug and it shows nicely in the Available Work Items

image

You can drag this to “In Progress work” and start your work.
image

When you are done with fixing code, Check in on the Pending Changes Tab. You will see that your Task is automatically related.

image

Now start a build, that builds this change.

image

If you now look at the build report, you see that not only the task where you worked on is related, but also the parent Bug! This is a great improvement and very useful in traceability scenarios!

image

image

Hope this helps !

Trackbacks/Pingbacks

  1. Combining TFS Version Control and Git with Git-TF | The Road to ALM - March 27, 2014

    […] In TFS Version Control you use the Team Explorer to relate your work item to your check-in (I talk a little about it here). In Git it is actually  much simpler. Just provide a #workitemid in the commit message and […]

%d bloggers like this: