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 Find and View 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

  • 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. Choose the Links or All Links tab.

    Changeset items are listed under the Changeset group.

  4. To view a specific changeset, choose the changeset and then choose Open Work ItemOpen Linked Item.

    Changeset Details appears in the Team Explorer window and shows the list of source files that are associated with the changeset and related work items.

    Changeset Details

  5. (Optional) Choose Rollback to roll back the effects of the changesets. See Roll Back Changesets.

  6. (Optional) Choose Track to show more information about merges of changesets within your codebase. See View Where and When Changesets Have Been Merged

  7. Choose the Back button to return the page to its previous setting.

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 opening the shortcut menu for a file and choosing 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, choose the Links or All Links tab, and then choose Add.

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

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

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

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

  6. On the work item toolbar, choose SaveSave 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. Choose the Links or All Links tab, and then choose Add LinksLink 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. Choose Find.

  9. Under Results, choose the changeset that you want, and then choose OK.

    Note

    To display the details for a changeset, you can open the shortcut menu for a changeset and then choose 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 SaveSave Work Item.

See Also

Concepts

Find and View Changesets

Other Resources

Link Work Items and Objects to Support Traceability