Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Associate work items with Git commit/push #43

Closed
millicandavid opened this issue Aug 4, 2016 · 7 comments
Closed

Associate work items with Git commit/push #43

millicandavid opened this issue Aug 4, 2016 · 7 comments

Comments

@millicandavid
Copy link

My team is wanting to enforce that all commits are associated with a Team work item. To do so today I have to open Visual Studio 2015 just to do my commits which is awful. It would be great to have this integrated somehow and this plugin seems like a better place than VS Code.

@jeffyoung
Copy link
Contributor

Hi @millicandavid.

Have you seen the information on branch policies? That documentation doesn't talk about it but, in my Team Services account, there's a policy for "Work item linking requirements":

image

I've not used that particular feature but perhaps it's what you're looking for?

@millicandavid
Copy link
Author

Sorry but I think I didn't make what I was requesting clear enough. What I want to be able to do is associate my git commit with a Team work item when I make the commit. In VS 2015 the option is there when you go to make a commit. I just haven't seen how to do it in VS Code or in this plugin. So my team wants to do what you are pointing to but I want to be able to comply with that policy within VS Code. Does that make sense?

@AlexRukhlin
Copy link

Hi,

You might add a work item mention (in form #nnnnnnn where nnnnnnn is the work item ID) somewhere in the commit's comment.

e.g.

This commit fixes the issue described in the bug #31415

or

Tasks #271828, #31415, and #98066 are completed with this commit

That mentions are processed on the server and commits will be associated with the corresponding work items. Would that help you?

Alex

@millicandavid
Copy link
Author

Yes Alex, I'm an idiot. Thanks. I can't believe I'd forgotten this. Please ignore my request.

@viveksharan
Copy link

Alex, I Used Source Tree to add the Commit Comment and added the #ID in the comment.

When I go to https://myproject.visualstudio.com and pul up the issue #ID, I still do not see anything linked associated to that work Item.

Any ideas if I am doing something wrong or if this scenario will work ?

@mayeager22
Copy link

mayeager22 commented Dec 18, 2017

I am in VSTS with Visual Studio 2017. I put #3 in a commit comment, but did not see the link in User Story #3. Did something get broken with this functionality?

@kaylangan
Copy link
Contributor

@mayeager22 please refer to #314

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants