Find, Link, and View Changesets Associated with a Work Item
When you make and check in changes to the code by using Team Foundation version control, you can associate the changeset with the work item that the changes address. A changeset lists the source files that you checked in for the changeset and a list of all work items that you linked to the changeset.
When you check in the files that you have changed to complete a work item, you might want to add a link from the work item to the changeset for that work. You can then track what files were involved in completing the work item. With Visual Studio Application Lifecycle Management (ALM), you can view the set of changesets that is associated with a work item, view the details of a changeset, and find changesets to link to a work item.
For more information, see Working with Changesets and Associate Work Items with Changesets.
You can perform the procedures in this topic from either Team Explorer or Team Web Access.
In this topic
Viewing Changesets That Are Associated with a Work Item
Opening a Changeset That Is Linked to a Work Item
Linking a Work Item to a Changeset
Finding a Changeset to Link to a Work Item
Required Permissions
To perform these procedures, you must be a member of the Contributors group or your View work items in this node, Edit work items in this node, Read, Check In, and Check Out permissions must be set to Allow. For more information, see Team Foundation Server Permissions.
Viewing Changesets That Are Associated with a Work Item
To view changesets that are associated with a work item
Open Team Web Access or Team Explorer, and connect to the team project collection that contains the team project where your work items are defined.
Open the form for the work item that you want to display.
Click the Links or All Links tab.
Changeset items are listed under the Changeset group.
To view a specific changeset, right-click it, and then click Open Linked Item.
The Details for Changeset window opens and shows the list of source files that are associated with the changeset.
(Optional) Click Work Items, Check-in Notes, and Policy Warnings to show more information.
Click Cancel to close the Details for Changeset window.
Opening a Changeset That Is Linked to a Work Item
To open a changeset that is linked to a work item
Open the work item that contains the link to the changeset that you want to open, and then click the Links or All Links tab.
Right-click the changeset that you want to open, and then click Open Linked Item.
Team Foundation version control displays the changeset details.
Linking a Work Item to a Changeset
To link a work item to a changeset
Submit a change to Team Foundation version control, and note the changeset number.
You can find the changeset number by right-clicking a file and clicking View History. In the History pane, look for the most recent change, and find the corresponding number in the Changeset column.
Open a work item, click the Links or All Links tab, and then click Add.
In the Add Link dialog box, in the Link type list, click Changeset.
In the Changeset box, type the changeset number.
If you do not know the changeset number, click Browse to search for a changeset.
In the Comment box, type a short comment about how the changeset relates to the work item, and then click OK.
On the work item toolbar, click Save Work Item.
Finding a Changeset to Link to a Work Item
To find a changeset to link to a work item
Open the work item to which the changeset relates.
Complete any required fields at the top of the form (for example, if you are resolving the work item at the same time).
Click the Links or All Links tab, and then click Link to.
In the Add Link dialog box, in the Link Type list, click Changeset.
Under Link Details, click Browse.
In the Find Changesets dialog box, you can search for changesets in the following manner:
Containing file In the Containing file box, type the file name.
You can also click the Browse button to search for the file.
By user In the By user box, type the name of the team member.
Under Range, specify in which changesets to search for the file, user, or both:
All changes Searches all changesets.
Changeset number Searches for changesets that are in a specific range of changeset numbers. Click Changeset number, and then type the range of changeset numbers to search.
Created date Searches for changesets that were created during a specific time period. Under Created date, specify a starting and ending date.
Click Find.
Under Results, click the changeset that you want, and then click OK.
Note
To display the details for a changeset, you can right-click a changeset and then click Changeset Details.
(Optional) Under Comment, type any comment that is important about this particular link.
Click OK.
On the work item toolbar, click Save Work Item.
See Also
Tasks
Associate Work Items with Changesets
Find, Link, and View Source Code Files Associated with a Work Item
Concepts
Other Resources
Creating Relationships Between Work Items and Other Resources