Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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 to link commits on Jira issue comment?

Deleted user Oct 28, 2017

Greetings! I want to know if it's possible to add a comment with a commit id and have it linked automatically to the issue on Bitbucket?

I have the two connected and with smart commits, I can reference the Jira issue on the commit message or even in the PR comment, and that works ok. 

But I want to be able to do is in a Jira issue comment, add the id of the commit and have it linked automatically to the issue on Bitbucket.

You can actually do this from Bitbucket issues (i.e. "this bug was introduced by commit 5e8c13c" and Bitbucket will create the link automatically). I want to be able to do the same but on a Jira issue.

6 answers

My current workaround is to create an hyperlink manually by copy commit hyperlink and name it with commit hash.

For example:

commit cd83b64

It would be nice if there was support for adding title for hyperlinks, so additionally I could add the commit title to the hyperlink title, for example (mouse over the link):

commit cd83b64

5 votes
Ana Retamal Atlassian Team Oct 30, 2017

Hi Cesar, at the moment that's not possible. You can include a Jira issue key in branch names, commit messages or pull requests title in Bitbucket, but you can't add the id of the commit and have it linked to the issue on Bitbucket. 

The integration will allow you to see the key details of branches, commits and pull requests without leaving Jira Cloud, and create new branches and pull requests directly from an issue.

You can read more about it at how Atlassian development tools integrate together.

If you'd like, you can propose your idea as a Feature request in our public Issue tracker.

Hope that helps! :)

Ana

Oh sorry, I should have posted that here: 

 

Did this ever get resolved?  It's been a little over 2 years now. 

No, this is still a very obvious missing feature. There is absolutely no way to link to a Github/other Git Portal commit from a Jira ticket, if the original Git commit did not correctly reference the ticket number.

Adding the ability to manually link a Jira ticket to Git commits would be extremely helpful.

Like # people like this

I have seen this done and I thought it was native to Jira but now I'm thinking that shop made some sauce for it.  I'll update here if I find out!

Did this ever get resolved?  It's been a little over 2 years now. 

This is a very important feature for tracking the progress of issues. We used to have it before migrating to Jira from the standard BitBucket issue tracker, and regret the decision to move.

Has there been any progress on this? I'd love this feature.

I'm also very interested in this feature idea.

Register your interest by voting for the suggestion in issue JRACLOUD-42215 (link below). Previous feature requests along these lines have been closed due to lack of interest AFAICT.

https://jira.atlassian.com/browse/JRACLOUD-42215

As SHA-1 hashes are unique it's an ideal way of referencing a git commit from the connected git repositories.

I've tried creating git references by adding git notes that reference Jira issues but it doesn't do anything.

The only way I've found to do it is manually creating the reference using the additional-cost Git For Jira Cloud app (bigbrassband). Sadly it's really slow and clumsy as there's no way of searching the commit list that I've found and you end up paging through hundreds of pages of git commits. The only practical way is to binary search the commit list by date by editing the URL.

The rather gross way of doing this is to put a URL to the commit from the BitBucket server. That is not relocatable without going through and editing in future. This seems like it should be relatively straightforward for Atlassian to do in their web server.

  • Assuming you know what repositories to look in, which Jira already knows
  • If you find a SHA-1 or SHA-256 in a comment, and check the repo whether it exists (ls-remote).
  • Present the SHA-1/256 as a URL when presenting the Jira issue web page.
  • If not found, leave it untouched.
  • This could also be done using a Markdown extension.

Suggest an answer

Log in or Sign up to answer
TAGS

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