Easily Show and Track Dependencies for Work Items in TFS 2010

Ed Blankenship
EdSquared
Published in
3 min readMar 4, 2010

Dependency management can be tough. One way you can help visualize dependencies is by using the new Predecessor & Successor link type in TFS 2010 Work Item Tracking. The way this particular link type works is that it is of type “Dependency” topology. Here’s some more information about the Dependency topology:

Link types of this topology are like Directed Network links in that they have directionality, but an additional constraint to prevent circular relationships.

Example XML:

1: <LinkTypes>

2: <LinkType ReferenceName=”MyLinks.LinkTypes.MyPred” ForwardName=”My Successor” ReverseName=”My Predecessor” Topology=”Dependency” />

3: LinkTypes>

You can list the link types currently on your TFS server by using the following command at a Visual Studio command prompt:

witadmin listlinktypes /collection:http://YourTfsServerName:8080/tfs/YourTeamProjectCollectionName

The details about the dependency link type that we’re interested as listed from witadmin.exe is:

Reference Name: System.LinkTypes.Dependency
Names: Successor, Predecessor
Topology: Dependency
Is Active: True

Gregg Boer has some more great information about customizing link types in TFS 2010 available here: http://blogs.msdn.com/greggboer/archive/2010/03/01/tfs-2010-customizing-work-item-link-types.aspx

Adding a Dependencies Tab on the Work Item Form Layout

If you would like to add a tab in the layout for the work item type definition, you can add the following XML segment to the WITD Layout Section:

1: <Tab Label="Dependencies">2:   <Control Type="LinksControl" Label="Dependencies Information for this Bug:" LabelPosition="Top" Name="Dependencies">3:     <LinksControlOptions>4:       <LinkColumns>5:         <LinkColumn RefName="System.Id" />6:         <LinkColumn RefName="System.WorkItemType" />7:         <LinkColumn RefName="System.Title" />8:         <LinkColumn RefName="System.AssignedTo" />9:         <LinkColumn RefName="System.State" />10:         <LinkColumn RefName="Microsoft.VSTS.Scheduling.OriginalEstimate" />11:         <LinkColumn RefName="Microsoft.VSTS.Scheduling.RemainingWork" />12:         <LinkColumn RefName="Microsoft.VSTS.Scheduling.CompletedWork" />13:         <LinkColumn RefName="Microsoft.VSTS.Scheduling.StartDate" />14:         <LinkColumn RefName="Microsoft.VSTS.Scheduling.FinishDate" />15:         <LinkColumn LinkAttribute="System.Links.Comment" />16:       LinkColumns>17:       <WorkItemLinkFilters FilterType="include">18:         <Filter LinkType="System.LinkTypes.Dependency" />19:       WorkItemLinkFilters>20:       <ExternalLinkFilters FilterType="excludeAll" />21:       <WorkItemTypeFilters FilterType="includeAll" />22:     LinksControlOptions>23:   Control>24: Tab>

It will then show up on your work items something like this:

Dependencies Tab for Work Items in TFS 2010

New Links Control Options

The LinksControl work item control has always existed but now that we have link types in TFS 2010, you can specify multiple links controls in the layout but have them specify certain filters. Notice the User Story/Requirement, Test Case, and Bug in the MSF Agile and MSF CMMI process templates all take advantage of specifying multiple links controls.

There is more very early information about the new options of this control here: http://blogs.msdn.com/teams_wit_tools/archive/2007/08/20/rosario-filtering-link-types-on-a-work-item-form.aspx

Dependencies Integration with Microsoft Office Project

One of the benefits of using the built-in Predecessor/Successor link type is that if you are pulling your work items into Microsoft Office Project, you end up seeing those dependencies in the project plan. You can even change the dependencies in Project and publish your changes back to the TFS where they’ll show up on the new Dependencies tab you just created. They are essentially round-tripped between Project and TFS 2010.

Microsoft Office Project Integration with TFS 2010 Tasks and Dependency Links Predecessor Successor

More Resources

Take care,

Ed Blankenship

--

--

Ed Blankenship
EdSquared

Product Director at Akeneo | Formerly at Contentful, Algorithmia, and Microsoft in DevOps