Associate Work Items to check-in in a TF Service Git enabled repository

Even if we are still in preview, Git support in TF Service already has some nice integration between git and all the rest of the world of TFS. As an example suppose you have a Work Item you are working to.


Figure 1: Simple Work Item in web interface

Now suppose you want to associate a local commit to this Work Item, all you need to do is inserting hashtag followed by the id of the Work Item in the comment of the commit, es #437. Since we are in the first preview of Git support actually there is no UI support, but using a simple comment is really quick and simple.


Figure 2: A commit that contains a reference to a Work Item

Now when you push changes to the TF Service, the commit will be associated to the corresponding Work Item, as you can see from Web Interface Code browser.


Figure 3: The Commits explorer window shows associated Work Item and all other details of the commit

As you can verify from Figure 3, you are able to visualize all the details of the commit with related Work Items included. You can click the link to the Work Item and you are bring to the Work Item editor where you can verify that the association is correctly done directly to the Work Item.


Figure 4: Commit is correctly associated with a Commit Link to the related Work Item

The association is not only in the commit explorer, but a real link is created between the Work Item artifact and the commit in code, as it happens in standard TFS VCS where the link points to a changesetid.

Gian Maria.

Published by

Ricci Gian Maria

.Net programmer, User group and community enthusiast, programmer - aspiring architect - and guitar player :). Visual Studio ALM MVP

4 thoughts on “Associate Work Items to check-in in a TF Service Git enabled repository”

  1. Is there any way to change the state of the work item via the comment. For example, make the Product Backlog Item go from New to Done?

  2. In this first version still there is not the ability to move status of work item, you can actually achieve this with a little bit of API (you can find an hint on this post

    You can expect that the level of integration between Git and TFS will improve over time, in the latest release the team added the support for building git source, and we can expect more news in the future.

    You can add this request to the appropriate user voice site if you like


  3. Hello,

    Since a couple of days the work item / commit integration seems not to work anymore on my project.
    Is this a known / global issue or is this something that I should investigate on ?


Comments are closed.