How to link commits on Jira issue comment?

Deleted user October 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.

7 answers

9 votes
Eido Askayo July 12, 2018

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
Atlassian Team members are employees working across the company in a wide variety of roles.
October 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

Casey Meijer May 29, 2020

Oh sorry, I should have posted that here: 

 

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

David Leeds August 19, 2020

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
Jonas Steinberg February 24, 2021

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!

Like rguzman likes this
4 votes
Casey Meijer May 29, 2020

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

3 votes
rsbeckerca November 29, 2020

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.

2 votes
Mike Copperwhite June 26, 2020

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.

rsbeckerca February 24, 2021

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.
2 votes
Paul Kauders June 24, 2020

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

0 votes
Muhammad Motawe July 15, 2021

Is it safe to assume that this hasn't been solved, yet?

rsbeckerca July 15, 2021

This has not been solved or addressed as far as I know. The enhancement case was open in 2015, has 49 votes. Other major providers support this (GitHub, GitLab). If GitHub ever makes branch-level security available to their private repository free plan, we will likely move over there because of this deficiency.

Like # people like this
chester.gan August 18, 2021

That's a shame.

Like # people like this
abhilashindulkar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 27, 2024

Any update on this very important missing feature..?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events