Customize your Work Item Type Definitions: Take advantage of Link Types

TFS 2010 allows you to create many different types of links between work items.  These are the available link types (out of the box):

  • Affects/Affected by
  • Tested By/Tests
  • Test Case/Shared Steps
  • Successor/Predecessor
  • Child/Parent
  • Related

This is a big change from the previous version as back then you could only create “related” link between work items. 

When you create a link between work items, you get a different graphical view depending of which link type you pick:

Affects/Tested By/Test Case/Successor



You can then choose to show related work items with a specific link type as part of your Work Item Type Definition.  You can see this in action if you look at a User Story in the MSF for Agile template:
The Implementation tab shows you only Parent/Child relationships, the Test Cases tab shows you “Tested By” relationships, and the “All Links” tab shows you every work item, changeset, and hyperlink related to your work item. 

If you want to implement something similar on your own work item type, this is what you need to do:

  • From the WorkItem editor (Power Tools), add a new control of type “LinksControl”
  • On the new control properties, select the Control Settings: “LinksControlOptionsType”
  • By default, you are going to see this:
        <LinkColumn RefName="System.Id" />
        <LinkColumn RefName="System.Title" />
        <LinkColumn RefName="System.AssignedTo" />
        <LinkColumn RefName="System.State" />
        <LinkColumn LinkAttribute="System.Links.Comment" />
      <WorkItemLinkFilters FilterType="includeAll" />
      <ExternalLinkFilters FilterType="includeAll" />
      <WorkItemTypeFilters FilterType="includeAll" />
  • The LinkColumns section allows you to specify which values of the related workitems you will show on your list. 
    • The WorkItemLinkFilters is used to control what types of links you will display.  This also controls the links types that show up on your “Link Type” drop-down when you are going to link to another work item from this control.  If you want to see a list of the link types that your TFS system has available, you can run this command:

      witadmin listlinktypes /collection:http://yourserver:8080/tfs/defaultcollection
    • You can read about the different link type topologies here:
  • The ExternalLinkFilters section lets you specify if you want to see work items, changesets, external links, etc.
  • The WorkItemTypeFilters section lets you filter by just specific work item types.

In my case, I wanted to all my parent and children tasks, so I used this:

    <LinkColumn RefName="System.ID" />
    <LinkColumn RefName="System.WorkItemType" />
    <LinkColumn RefName="System.Title" />
    <LinkColumn RefName="System.AssignedTo" />
    <LinkColumn RefName="System.State" />
    <LinkColumn LinkAttribute="System.Links.Comment" />
  <WorkItemLinkFilters FilterType="include">
    <Filter LinkType="System.LinkTypes.Hierarchy" />
  <ExternalLinkFilters FilterType="excludeAll" />
  <WorkItemTypeFilters FilterType="include">
    <Filter WorkItemType="Task" />

And that translates to this:


You can also further filter which relationships are shown (for example, parent vs child).  You can read about it here:

About esteban

Esteban is the Founder and Chief Technologist at Nebbia Technology, an ALM consulting and Azure-powered technology company. He is a software developer with a passion for ALM, TFS, Azure, and software development best practices. Esteban is a Microsoft Visual Studio ALM MVP and ALM Ranger, Pluralsight author, and the president of ONETUG (Orlando .NET User Group).

5 thoughts on “TFS 2010 Dashboards with SharePoint 2010 (MOSS)

  1. Jose Medero

    Hi Esteban, i am working on integrating my company’s TFS 2010 with a SharePoint 2010 portal. I have been looking that several blogs shows that when the configuration is done they get several dashboards. In my case the only dashboard that was created was “My Dashboard”. Wath do I need to get other dashboards like the ones mentioned in your article.

    I am working on a sharepoint 2010 farm single server test enviroment with my production TFS 2010. My configuration goes as follows:
    – TFS 2010 Standard
    – SharePoint 2010 Enterprise
    – Sql 2008 r2 Enterprise with Report Server in Integrated Mode.
    – SP has been integrated with reporting services.

  2. Esteban Garcia

    Do you see any errors in the Team Project creation log? I seem to remember running into this before, and I think it had to do with permissions during the creation of the Team Project, but I may be mistaken. Can you take a look at your log file and let me know?

  3. Bob Cronin

    I know this is an old post Esteban, but it saved me today. Thanks for publishing!

  4. Anurag Jain

    Hi Esteban, Thanks for this nice explanation, But i do have some other requirement.
    Lest say if we have WorkItemLinkFilters LinkType=”System.LinkTypes.Hierarchy” then WorkItemTypeFilters should be “Task” and if we have WorkItemLinkFilters LinkType=”System.LinkTypes.Hierarchy” then WorkItemTypeFilters should be “child” only. Is it possible to achieve ?

  5. Sankar

    This is working fine for active users.. How can I remove inactive user from Team Foundation Service Accounts using this command?

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you human? *