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

  1. 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.

  2. Open the form for the work item that you want to display.

  3. Click the Links or All Links tab.

    Changeset items are listed under the Changeset group.

  4. 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.

    Details for Changeset

  5. (Optional) Click Work Items, Check-in Notes, and Policy Warnings to show more information.

  6. 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

  1. 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.

  2. Right-click the changeset that you want to open, and then click Open Work Item Open Linked Item.

    Team Foundation version control displays the changeset details.

Linking a Work Item to a Changeset

  1. 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.

  2. Open a work item, click the Links or All Links tab, and then click Add.

  3. In the Add Link dialog box, in the Link type list, click Changeset.

  4. In the Changeset box, type the changeset number.

    If you do not know the changeset number, click Browse to search for a changeset.

  5. In the Comment box, type a short comment about how the changeset relates to the work item, and then click OK.

  6. On the work item toolbar, click Save Save Work Item.

  1. Open the work item to which the changeset relates.

  2. Complete any required fields at the top of the form (for example, if you are resolving the work item at the same time).

  3. Click the Links or All Links tab, and then click Add Links Link to.

  4. In the Add Link dialog box, in the Link Type list, click Changeset.

  5. Under Link Details, click Browse.

  6. 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.

  7. 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.

  8. Click Find.

  9. 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.

  10. (Optional) Under Comment, type any comment that is important about this particular link.

  11. Click OK.

  12. On the work item toolbar, click Save Save Work Item.

See Also

Tasks

Associate Work Items with Changesets

Find, Link, and View Source Code Files Associated with a Work Item

Concepts

Working with Changesets

Other Resources

Creating Relationships Between Work Items and Other Resources