Forgot to link your changeset with a work item in TFS/TFVC? No problem, just add the link manually

Posted: (EET/GMT+2)

 

If you use Team Foundation Server's (TFS) Version Control (TFVC), it is easy to occasionally complete a check-in and only afterwards notice that the changeset was not linked to the correct work item. Sometimes, this happens to me, too.

Fortunately, the missing link (association) can still be added manually afterwards. You just have to do it through the work item; not the changeset. Here's how:

Open the work item in Visual Studio or Team Explorer and go to the All Links section. From there, choose to add a new link and select:

  • Changeset as the link type
  • the changeset ID from the completed check-in.

The changeset ID can be found from Source Control Explorer, the check-in history, or the Changesets view.

For example:

Changeset: 12345

Once saved, the work item and changeset are associated the same way as if the link had been added during the original check-in.

This is useful when, for example:

  • the wrong work item was selected during check-in
  • the check-in was completed in a hurry (who would ever do that...?)
  • multiple related work items need to reference the same changeset.

Hope this helps!