Create or Delete Relationships Between Work Items
You can create relationships between work items to make a simple association, view two-tiered or hierarchical relationships, and track and manage dependencies. To create these relationships, you can add a link between one work item and another or many work items. When you add a link from one work item to another work item, Team Foundation must modify both work items.
All link relationships are stored in the work item database for Team Foundation. When you add, modify, or delete a link, your changes are applied to that database when you are working in Microsoft Excel or Microsoft Project. When you are working in Team Web Access or Team Explorer, your changes are applied to the database when you save one of the work items that are either the source or target of the link relationship.
When you create a one-to-many relationship, you use one of the following methods to create a list of work items:
Saved query. Use this method when you have created a query that you know contains the set or subset of the work items that you want. For more information, see Finding Bugs, Tasks, and Other Work Items.
Work item IDs. Use this method when you know the IDs of the work items and you would rather type those IDs than run a query or a title search.
Title search. Use this method to find work items that have a common word or phrase in the work item title field, and optionally, by team project and work item type.
In this topic
To add, modify, or delete a link in a work item, complete one of the following procedures:
Note
The following procedures assume that the team project uses the work item types for MSF for Agile Software Development, which are included with Team Foundation. If your team project uses a different process, these procedures might not apply to your work items. You might need to refer to the custom help documentation created for the process that you will use. For more information, see Access a Team Project Portal and Process Guidance.
Adding a Link from a Work Item to an Existing Work Item
Finding, Listing, and Selecting Work Items to Add
Modifying an Existing Link
Deleting a Link Between Work Items
Note
To create a work item and link to an existing work item, see Create a Linked Work Item.
To add, modify, or delete parent-child links, see Configure Work Items in a Tree List in Office Excel. and View and Modify Work Items in a Tree View. To work with the native tools of Microsoft Project to create and manage parent-child and predecessor-successor links, see Sequence or Subordinate Tasks in Office Project.
Required Permissions
To add, modify, or remove a link between work items, you must have permission to view both of the work items and to modify at least one of them. You must be a member of the Contributors group or have your View work items in this node, and your Edit work items in this node permissions set to Allow. For more information, see Team Foundation Server Permissions.
Adding a Link from a Work Item to an Existing Work Item
To add a link to a work item by using Team Web Access
In Team Web Access, open the work item that you want to edit.
Click the tab for managing links.
Note
The name of the tab might be Links, All links, or Implementation. The name of the tab is determined by the work item definition.
Point to Add, and then click the type of link that you want to add.
Note
Do not select Changeset, Hyperlink, Test Result, or Versioned Item. These link types do not create relationships between work items. For more information about those types of links, see Creating Relationships Between Work Items and Other Resources.
The Add Link/Attachment - Microsoft Team Web Access - Webpage Dialog box opens.
Check the box which matches the method for finding work items that you want to use. For more information, see the procedure listed below: Finding, Listing, and Selecting Work Items to Add.
Click Save or Save & Close.
To add a link to a work item by using Team Explorer
In Team Explorer, open the work item that you want to edit.
Click the tab for managing links.
Note
The name of the tab might be Links, All links, or Implementation. The name of the tab is determined by the work item definition.
Click Add.
The Add Link Dialog box opens.
Specify the work items to which this work item should link.
Note
Do not select Changeset, Hyperlink, Test Result, or Versioned Item. These link types do not create relationships between work items. For more information about those types of links, see Creating Relationships Between Work Items and Other Resources.
For more information, see the procedure listed below: Finding, Listing, and Selecting Work Items to Add.
(Optional) Type a description in the Comment box.
Click OK.
Click Save Work Item.
To add a link to a work item by using Microsoft Excel or Microsoft Project
In the Microsoft Excel worksheet or Microsoft Project plan, click the work item to which you want to add a link.
On the Team menu, click Links and Attachments.
Click the Links tab.
Click Add.
In the Link type list, click the link type that represents the relationship that you want to create.
Specify the work items that should link to this one.
Separate multiple IDs with commas.
For more information, see the procedure listed below: Finding, Listing, and Selecting Work Items to Add.
Click OK.
In the View/Edit Work Item Links and Attachments dialog box, click Publish, and then click Close.
(Optional) Save the Office Excel worksheet.
(Optional) On the Team menu, click Refresh.
This step causes modifications made to parent-child links to appear in the Office Excel worksheet.
Finding, Listing, and Selecting Work Items to Add
To find, list, and select work items
(Optional for Team Explorer) If you create a link to a work item that is in defined in another team project, in the Project list, click the name of the project that contains the work items that you want to find.
Note
The Project list appears only when you are searching for work items to link to the current work item.
Specify one of the following search methods, and then define the search criteria:
Saved query
In the Saved query list, expand the team project (Team Web Access only), expand My Queries or Team Queries, and then click the name of the saved query for which you want to display results.
(Team Explorer only) You can also click the Browse button next to the Saved query list, select a saved query in the Select Query dialog box, and then click OK.
Note
The Select Query dialog box is often the best solution if your team project contains many queries. You can drag a corner of the dialog box to make it larger and display more saved queries.
IDs
In the IDs box, type the work item IDs of the work items that you want to find. Separate IDs by commas or spaces.
Title contains
In Title contains, type the word or words that the work item title should contain.
(Optional for Team Explorer) In the and type list, click the type of work item that you want to retrieve.
(Optional for Team Web Access) In the Work item type list, click the team project and type of work item that you want to retrieve.
Note
If you narrow the filter criteria for the search, the query runs more quickly.
Click Find.
(Optional) Change the display of the result list by performing any one of the following steps:
To expand or collapse a tree view list, click the (+) or (-) signs.
To resize a column, point to the edge of a column title and drag the column boundary to a new location.
To sort on a column field, click the column title.
To move a column field, click the column title and drag it to another location.
For additional options, see Keyboard Shortcuts for the Query Editor and Query Results View.
Specify each item in the result list that should link to the current work item.
Team Web Access: select or clear the check box next to each work item, or click Select All to select all the work items.
Team Explorer: select each work item to specify that it should link to the current work item. To specify a continuous range of work items, press and hold the SHIFT key when you click the first and last work item in the range. To specify a non-continuous set of columns, press and hold the CTRL key when you click each work item.
(Optional for Team Web Access) Type a description in the Comment box.
Click OK.
Modifying an Existing Link
To change the link type or link attributes of an existing link
Perform one of the following actions;
In Team Web Access or Team Explorer, open a work item on one side of the link, and click the Links tab on the work item form.
Note
The name of the tab might be Links, Other links, or Implementation. The name of the tab is determined by the work item definition.
In Microsoft Excel or Microsoft Project, click the work item from which you want to modify a link, and then on the Team tab or menu, click Links and Attachments.
Click the link that you want to modify, and then click Edit.
Modify the link attributes, and then click OK.
Review the link in the Links tab, and then press Ctrl+S to save the work item and the changes made to the link.
Deleting a Link Between Work Items
To edit or delete a link between work items by using Team Web Access or Team Explorer
Open the source work item that contains links that you want to delete.
Click the tab for managing links.
Note
The name of the tab might be Links, Other links, or Implementation. The name of the tab is determined by the work item definition.
Click or select the work items that should no longer be linked to the source work item.
To specify a continuous range of work items, press and hold the SHIFT key when you click the first and last work item in the range. To specify a non-continuous set of columns, press and hold the CTRL key when you click each work item.
Click Delete Link.
Click Yes to confirm the deletion.
Click Save to save the changes to both the source and target work items, and to delete the links from the Team Foundation database.
To edit or delete a link between work items by using Microsoft Excel or Microsoft Project
In the Microsoft Excel worksheet or Microsoft Project plan, click the work item from which you want to delete a link.
Note
If you are working offline in Microsoft Excel or Microsoft Project (that is, you are not connected to Team Foundation Server), you cannot create or delete links to work items using the procedures provided in this topic. To create a link to a work item, it must be defined in the Team Foundation database. Exceptions to the online storage constraint are parent-child links in Microsoft Excel and both parent-child and predecessor-successor links in Microsoft Project. The exceptions apply to new work items that you have not yet published and also to work items that are already in the database.
On the Team tab or menu, click Links and Attachments.
In the View/Edit Work Item Links and Attachments dialog box, click the Links tab.
Click or select the work items that you no longer want to be linked to the source work item.
Click Delete Link.
Click Yes to confirm the deletion.
Click Publish to save the changes to the Team Foundation database.
(Optional) Save the Microsoft Excel worksheet or Microsoft Project document.
(Optional) On the Team menu, click Refresh.
This step causes any changes that were made to links to appear in the Microsoft Excel worksheet or Microsoft Project document.
See Also
Tasks
Create, Open, and Modify Work Items Using Office Excel
Sequence or Subordinate Tasks in Office Project
Create a Microsoft Project Plan from Team Foundation Work Items
Concepts
Finding Bugs, Tasks, and Other Work Items
Other Resources
Creating Relationships Between Work Items and Other Resources