Share via


Add a Link Type

You can create custom link types to help define relationships between your work items and track your team project in ways that meet your requirements. A link type defines the type of relationship that is made between two work items. The link type is specified in a type definition XML file that you can export from Team Foundation Server. You can manage link types for a project collection. Before you create link types, you can review how links are used and the types of links that you can create. For more information, see Working with Link Types and Choosing Link Types to Effectively Track Your Project.

Required Permissions

To create a link type, you must be a member of the Team Foundation Administrators security group. To export the link types XML file, you must have your permissions set to connect to Team Foundation Server. For more information, see Team Foundation Server Permissions.

Note

Even if you log on with administrative permissions, you must open an elevated Command Prompt window to perform this function on a server that is running Windows Server 2008. To open an elevated Command Prompt window, click Start, right-click Command Prompt, and click Run as Administrator. For more information, see the Microsoft Web site: User Account Control.

  1. In Visual Studio, create an XML file for your work item type. To do this, on the File menu, click New, and then click File.

  2. In the New File dialog box, under Categories, select General, and then under Templates, select XML File.

  3. Copy and paste the following code into the file:

    <?xml version="1.0" encoding="utf-8"?>
    <LinkTypes>
      <LinkType ReferenceName="=Link Type Reference Name" ForwardName="Forward Name" ReverseName="Reverse Name" Topology="Topology Type" />
    </LinkTypes>
    
  4. Specify the names that you want for the link type and the endpoint names. Modify the LinkType element by specifying the values for these attributes:

    Attribute

    Description

    ReferenceName

    Name of the link type. This is the name that is used internally when you create a link between two work items.

    ForwardName

    Name of the link at the source work item. This is the name that displays when you add links to the source work item.

    ReverseName

    Name of the link at the target work item. This is the name that displays when a listing of the links at the target work item appears.

    TopologyType

    Specifies one of four topologies: Dependency, DirectedNetwork, Network, or Tree. Directional topologies, Dependency, DirectedNetwork, and Tree, are used when you define subordinate relationships. Non-directional topologies are used when you define relationships that are peer-to-peer, or where no implied subordination exists.

    For more information about each of these fields, see Working with Link Types.

  5. Save the changes by clicking Save on the toolbar. In the Save File As dialog box, type the name of the file, and save it as an .xml file.

  6. To import the link type to your team project collection, type the witadmin command that uses the following syntax, and then press ENTER:

    witadmin importlinktype /collection:http://ServerName:Port/VirtualDirectoryName/CollectionName **/f:**FileName

    Specify the directory path and name of the file that you saved in step 5.

See Also

Reference

Customizing and Managing Link Types [witadmin]

Concepts

Working with Link Types

Choosing Link Types to Effectively Track Your Project

Customizing Project Tracking Data, Forms, Workflow, and Other Objects

Other Resources

Creating Relationships Between Work Items and Other Resources