Welcome to MSDN Blogs Sign in | Join | Help

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?

 

Published Monday, August 20, 2007 9:57 PM by Gregg Boer

Comments

# New links control features in Rosario

Tuesday, August 21, 2007 7:35 PM by Naren's Blog

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

# VSTS Links - 08/22/2007

Wednesday, August 22, 2007 9:05 AM by Team System News

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

# Customizing Work Item Link Types in TFS 2010

Friday, June 05, 2009 11:17 AM by Teams WIT Tools

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

Anonymous comments are disabled
 
Page view tracker