Link work items and objects to support traceability

By creating relationships between work items and other resources, you can plan projects more effectively, track dependencies more accurately, view hierarchical relationships more clearly, and find relevant information more quickly. For example, you can create a relationship between two work items to show that one of the items must be completed first. In addition, you can create a relationship between a work item and a changeset to show how the code was changed to address a feature request.

The following illustration shows the various types of relationships you can specify between work items and other objects to support traceability. All links and attachments are stored in the work item database for Team Foundation. When you add or delete links or attachments, your changes are applied immediately to that database. 

Supported Link Types

You can create links or attach files from within a work item form, from a work item that appears in a list of query results, in Office Excel, or in Office Project. You can also use any of the client programs for Team Foundation, such as Team Explorer and Team Web Access, to create links or attach files.

In this topic

  • Link work items to work items

  • Link test cases to shared steps and test results

  • Link work items to changesets or shelvesets

  • Link work items to storyboards or files on a network share

  • Link work items to models and diagrams

  • Share information by linking to files or Web pages or by attaching files to a work item

  • Related tasks

Before you start to create links between work items, you should analyze how you might use links to plan your project and track the status of work items. You should link work items with the Related, Parent-Child, and Predecessor-Successor link types based on the types of queries and reports you'll want to create. See Choose Link Types to Effectively Track Your Project.

You can create links between work items by using one of the links control tabs within a work item form. Some work item types have three or more links control tabs. Each tab is designed to support specific types of links and restricts the types of link relationships made. See Link Controls, Restrictions, and Field Reference.

Work item form links control tab

Work item form link toolbar controls

Also, you can use the shortcut menu, as shown below, for Team Explorer. See Create or Delete Relationships between Work Items

Link a work item to an existing work item

Link to an existing work item

By using a tree query in Team Explorer, you can promote or demote work items, and change the tree structure by dragging them. By using a tree list in Office Excel, you can add or delete work items, in addition to modifying their tree structure. See Work with linked hierarchies (Tree of Work Items) and Bulk add or modify work items with Excel.

Also, you can export a query to Office Project to create parent-child or predecessor-successor relationships. See Create your schedule, backlog, and tasks using Microsoft Project.

From a work item form, you can open one or more work items that are linked to the open work item. In Team Explorer, you can also modify links by changing the link type, changing the work item id, or by adding a link comment. Some restrictions on changing the link type apply.

The link types, Tested and Tested By are used to link test cases to work items, and Test Case and Shared Steps are used to link Shared steps to test cases. Using Microsoft Test Manager, you can create test cases and test plans which define and manage these associations. Also, Test Manager creates and manages the associations of test results to test cases and test plans. See How to: Create a Manual Test Case and How to: View Manual Test Case Results Using Microsoft Test Manager

Creating test cases and linking to shared steps using Microsoft Test Manager

Create a Manual Test Case

You can create relationships between work items and version control changesets and between work items and source code files by using the Changeset and Versioned Item link types. These relationships are useful when you need to determine the changeset or source control file that is associated with a feature, task, bug, or other work item. To use these link relationships, your team must use Team Foundation for version control.

With Changeset and Versioned Item links, you and other team members can perform the following tasks:

  • Associate version control changes with a particular work item.

  • Track the set of files that were involved in completing a work item.

  • View changes that have been made in the source code to address a work item.

Note

You cannot create a Work Items and Direct Links query that finds work items that are linked by using the Changeset and Versioned Item link types.

When you use My Work to check in your work, the work items are automatically linked to your changes. For more information, see one of the following topics:

You can link storyboards that you created using PowerPoint Storyboarding or other application from the Storyboards tab. By default, this links control is added to those item types used to defined requirements, user stories, or features. When you make changes to a linked storyboard, the work item continues to link to the file with the latest changes.

Storyboards tab and links control

Storyboard links control in Team Web Access

Before you can link a storyboard to a work item, you must save it to a shared location. The shared location can be any shared folder on the network, a SharePoint site, or a team project portal. By linking the storyboard to a work item, you provide your team access to the shared file where they can add their comments.

For more information, see Storyboard your ideas using PowerPoint.

By specifying the Model link type, you can link a work item to a diagram created using Visual Studio Ultimate. This lets you track tasks, test cases, bugs, requirements, issues, or other kinds of work that are associated with specific parts of your model. Or, you can link a model element to a work item. See Link Model Elements and Work Items.

Link Model elements to work items

Open linked model element from a work item

Share information by linking to files or Web pages or by attaching files to a work item

From the Links or All Links tab, you can select the Hyperlink link type to add a hyperlink from a work item to a Web page or a document on a Web site. See Add or Delete a Hyperlink in a Work Item.

To embed a hyperlink within a work item form, see Provide Help Text, Process Guidance, Web Content, and Links to Web Pages on a Work Item Form.

From the Attachments tab, you can attach any kind of file such as a document, an image, a log file, or an e-mail thread to a work item. You can help track or implement a work item by finding or creating a file that has additional details and attaching the file to the work item. For example, you can capture and attach a screen image that illustrates a problem, a line of code in a text file, or a product feature's specification. See Create or Delete a File Attachment in a Work Item and Open or Save a File Attached to a Work Item.

Attachment control toolbar

Attach files to a User Story

  • To create a custom type of link and manage available types of link see Link Type Element Reference and Customize and Manage Link Types [witadmin]. You can create custom link types; export and import definitions of link types; and delete, activate, deactivate, and reactivate types of links.

  • To create a work item that is automatically linked, see Create a Linked Work Item. From a list of query results, you can create a work item that is automatically linked to an existing work item.

  • To find linked work items by creating and running a query, see Work with linked dependencies (Direct Links). You can search for work items that not only meet criteria for field values but also that are linked to other work items with specific types of links. This kind of query displays a primary set of work items, which meet the field criteria, and a secondary set, which are linked to items in the primary set.

See Also

Concepts

Use Team Foundation clients to interact with Visual Studio ALM

Link Controls, Restrictions, and Field Reference

Link Type Element Reference

Track Work and Manage Workflow