17
votes

In the past out team was developing projects with TF Source Control. Now we started developing a new project on TFS 2013 with bundled in it Git as VCS.

Recently I accidentally made a commit to new project without linking work item to it. As in similar situations in the past I opened corresponding work item in VS 2013 and then opened tab "All Links" in it to make a link to commit. I noticed that another commits were linked with type "Fixed in Commit". I pressed button "Link to" and then tried to find there corresponding link type, but there were no such. There were only "Changeset" link type related to code but it shows me only TFVC changesets in other Team Projects but not Git commits.

I tried another way. I opened another commit from this work item, opened history of one file that I changed in my "unlinked" commit and double clicked on last commit, so VS opened "Commit Details" window with my commit. But there were no buttons allowing me to link this commit to work item from this window either.

Are there any way or it is planned to do in future versions of VS/TFS?

1
It should be noted that when doing the commit, including "#1234" (where "1234" is the work item number) in the commit comment will make the link automatically.Overlord Zurg
The crucial part of the question was how to make link after commit. But your comment is worth noting for the full picture.v.karbovnichy
If I understood your question correctly, the functionality you are looking for is implemented in Visual Studio 2015. I have a committed package in a local feature branch (not yet synced to the feature branch on TFS) and when I select "Commit Details", I have the opportunity to Amend the the message. When I do, and I put in the #NNN Work Item Number, the work item appears in "Related Work Item List".jlo
Oddly, there doesn't seem to be any way to interact with that list other than to add Work Item numbers to the comment. Also, it seems you can only add on, putting in "My message #55 #56: only appends #55.jlo

1 Answers

22
votes

You will have to link this work item from TFS Web Access at the moment. There you can link the work item and have access to the expected "Commit" option:

enter image description here

Indeed, this looks like something that we should improve in future versions of Visual Studio.