It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can you link source to an issue after a commit has happened (in GIT)?

Hector Palacios May 10, 2012

Is there any way to link a GIT commit to an issue after the commit is already pushed to the remote without having added the issue ID to the commit message?

Notice that a commit that has been pushed to the remote cannot be ammended/editted. I was hoping that adding a comment with the SHA1 of the commit would establish the link between the issue and the commit. Or even if there is a more complex way of doing it. But this is a real need.

A similar question has been posted before (https://answers.atlassian.com/questions/5795), but referred to source code in SVN.

6 answers

1 accepted

0 votes
Answer accepted
Joe Xie Atlassian Team May 14, 2012

Assuming you are usin the JIRA Fisheye Plugin, the only way to link a commit to a JIRA issue is via the JIRA issue key in the commit message. Unless you are able to amend the message (which seems like you can't/won't), then you are stuck.

Hector Palacios May 14, 2012

Yes, I'm using Fisheye. Has Atlassian considered the possibility of implementing a manual linking of issues and source code in GIT? I think this would be a very good feature.

Thanks

Gary Taylor Jul 25, 2012

I'd vote for such a feature too.

Like Amandeep Singh likes this
Stanley Goldman Jul 02, 2013

The lack of this feature means I also cannot correct incorrectly linked changesets.

Can we be linked to a feature request page where I can vote for this?

Like Alexander Gordt likes this
2 votes
Eli Nunna May 08, 2014

Inability to arbitrarily link issues to source code severly limits the usefulness of fisheye integration in jira.

1 vote
Stanley Goldman Jul 02, 2013

The lack of this feature means I also cannot correct incorrectly linked changesets.

Can we be linked to a feature request page where I can vote for this?

1 vote
William Roush Dec 22, 2014

Ouch, that's rough. Makes fixing issues impossible and all we need is a simple UI element to do this!

0 votes
Brady Vidovic Mar 18, 2015

Same problem here!

0 votes
Ferenc Kiss [Midori] Aug 11, 2015

Instead of fixing this problem, you may want to prevent this using the Commit Policy Plugin:

Edit Commit Policy.png

You can enforce a strict condition to include issue keys matching a JQL query's result. It does work with Git (plus Mercurial and Subversion).

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

860 views 12 14
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you