Rosario: Filtering link types on a work item form


In Whidbey, and Orcas, the work item links control that displayed the links always showed all the links. For Rosario, we made a design decision based on the fact that whoever is designing a work item form, may want to display certain link types separately from other link types.


For example, let’s say you have a tab on the work item form which manages your dependent features. It would make sense that the links control on that tab only display links to dependent features.


This is where the new filtering functionality with the links control comes in.


In the work item type XML in Whidbey/Orcas, this is what you did when you wanted to display a links control:


<Control Type=”LinksControl“/>


With Rosario, we’ve add the LinksControlOptions section to allow you to filter what link types to include.


The simple example would render a links control that includes all work item links (Related, Parent/Child), and exclude any non-work item links (ChangeSets, Hyperlinks, Test Results):


<Control Type=”LinksControl Name=”UniqueName“>


   <LinksControlOptions>


     <WorkItemLinkFilters FilterType=”includeAll” />


     <ExternalLinkFilters FilterType=”excludeAll” />


  </LinksControlOptions>


</Control>


 


The following example would render a links control that displays only Requirement and Hierarchy links.


<Control Type=”LinksControl Name=”UniqueName“>


  <LinksControlOptions>


<WorkItemLinkFilters FilterType=”include“>


<Filter LinkType=”MyLinks.LinkTypes.Requirement” />


<Filter LinkType=”System.LinkTypes.Hierarchy” />


</WorkItemLinkFilters>


 


<ExternalLinkFilters FilterType=”excludeAll” />


 </LinksControlOptions>


</Control>


 


The following example would render a links control that displays all work item links except Requirement and Hierarchy links.


<Control Type=”LinksControl Name=”UniqueName“>


  <LinksControlOptions>


<WorkItemLinkFilters FilterType=”exclude“>


<Filter LinkType=”MyLinks.LinkTypes.Requirement” />


<Filter LinkType=”System.LinkTypes.Hierarchy” />


</WorkItemLinkFilters>


 


<ExternalLinkFilters FilterType=”excludeAll” />


 </LinksControlOptions>


</Control>


 


The following example would render a links control that displays only Change Set links.


<Control Type=”LinksControl Name=”UniqueName“>


  <LinksControlOptions>


<WorkItemLinkFilters FilterType=”excludeAll“/>


 


<ExternalLinkFilters FilterType=”include” />


<Filter LinkType=”Change Set” />


</ExternalLinkFilters>


 </LinksControlOptions>


</Control>


 


That should give you a pretty good idea of what can be done. Any questions? Feedback?


 

Comments (3)

  1. Naren's Blog says:

    Rosario is next release of TFS after upcoming Orcas release. You can read a lot about Rosario from Brian’s

  2. The Teams WIT Tools Blog on Rosario: Filtering link types on a work item form and What is a Team…

  3. A long time ago (almost 2 years ago), I blogged about how to customize link types. Since the Beta1 has

Skip to main content