Add link type definitions to a process template

Visual Studio Team Foundation Server 2013

Define link types

You must specify each link type definition using the LinkType element. In addition, each definition must conform to the schema definition for link types, which are defined in the workitemlinktypedefinition-01.xsd file. You can download the schema files for tracking work from the following page on the Microsoft website:

Process Template and Work Item Schemas for Visual Studio Team Foundation.

The following example shows the syntax structure that defines the TestedBy link type.

 Copy imageCopy Code
<?xml version="1.0" encoding="utf-8"?>
<LinkTypes>
  <LinkType ReferenceName="Microsoft.VSTS.Common.TestedBy" ForwardName="Tested By" ReverseName="Tests" Topology="Dependency" />
</LinkTypes>

You can customize or create definition files for types of links in the LinkTypes folder. For more information about how to define a type of link, see Define a custom link type.

Back to top

Specify link type definitions to upload

To upload a link type definition in the process template, you specify the LINKTYPE element within the taskxml element. The filename attribute is a relative path of the definition file for the link type. For example, the following syntax specifies that the TestedBy.xml file will be uploaded.

 Copy imageCopy Code
<LINKTYPE fileName="WorkItem Tracking\LinkTypes\TestedBy.xml" />

The following example shows how to specify a task that creates the two types of links that are defined in the process template for MSF for Agile Software Development v5.0. These types correspond to the SharedStep and TestedBy link types.

 Copy imageCopy Code
<task id="LinkTypes" name="LinkType definitions" plugin="Microsoft.ProjectCreationWizard.WorkItemTracking" completionMessage="Work item link types created">
   <taskXml>
      <LINKTYPES>
         <LINKTYPE fileName="WorkItem Tracking\LinkTypes\SharedStep.xml" />
         <LINKTYPE fileName="WorkItem Tracking\LinkTypes\TestedBy.xml" />
      </LINKTYPES>
   </taskXml>
</task>

Back to top

LINKTYPES element reference

The following table describes the elements that you use to upload link type definitions. You specify these elements within a taskXml container element in the WorkItemTracking plug-in file.

NoteNote

You specify the file that defines link types to upload by using the LINKTYPE (WorkItemTracking) element. You specify the name of a link type to define by using the LinkType (Definition) element.

Element

Syntax

Description

LINKTYPE

 Copy imageCopy Code
<LINKTYPE fileName="LinkTypeFilePathName" />

Required child element of LINKTYPES.

Specifies the path and name of a file that contains a link type definition to upload.

LINKTYPES

 Copy imageCopy Code
<LINKTYPES>
     <LINKTYPE />
 . . .
</LINKTYPES>

Optional child element of the WorkItemTracking plug-in.

Contains a collection of LINKTYPE elements that each specify a definition file to upload.

See Also

Reference

Manage link types [witadmin]

Concepts

Other Resources

Define a custom link type