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?