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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


What links a JIRA issue to Bitbucket commits/PRs


We are using the server versions of both JIRA and Bitbucket. When I view JIRA project releases I can view issues belonging to that release. The Development column shows commits and the merge status of pull requestsl linking to those tickets. 

I see commits linked from having the JIRA issue ID in the commit message. What else creates this link? Branches with a JIRA issue ID in the name? Anything else?


2 answers

1 accepted

6 votes
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 23, 2017 • edited

JIRA issues are linked when you mention the JIRA key in Bitbucket, either in the branch name, as part of the description or comment in a pull request or as part of the commit comment (as you have seen). 

Here is some more information about the integration,

Perfect. Thank you!

Do user forks not apply?

I committed to a user repo under my account, which displayed the commit fine in the Development area in the JIRA issue.

When I attempted the same in a forked repo under my account, the commit did not display in the JIRA issue.

I also tested with a fork that is under a project, not a user account, and that displays fine.


I've run into this just now, I find that issues are linked in the Bitbucket PR if I mention the JIRA ticket in the git branch name or in the git commit message, but they if I mention them in the PR description or in a comment then the text is hyperlinked but the ticket number does not appear at the top as a linked ticket. This doesn't seem to be the expected behaviour, going by the answer above?

Like # people like this

Automatic linking with a JIRA ticket by mentioning the key in a commit doesn't work for me either (though it used to work in the hosted Bitbucket). Has anything changed since then?

Like # people like this

It doesn't work for me either, but it may because I am using the free versions, I do not know for certain.

Auto linking of the commit message to the jira works, but the commit message is not showing up in the jira task. Breeze does this much better

Come on atlassian, lift your game

Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Dec 11, 2020

What about when you have already done several commits in a new branch. And THEN decide to create a Jira issue?

it is not easy to modify all my existing commits to have the Jira issue ID. 

@ChuckieAJ try adding the ticket number in the PR title. Or, if need be, it always works to manually add a weblink to the Jira ticket, containing the URL of the PR.

I have been able to associate a Jira ticket with bitbucket branches, commits and PRs by using the suggested method.

What I don't understand is when my branch already has the issue key at the head of the name and is linked to Jira, when creating a PR I also need to remember to mention it in the PR description?

This seems counter intuitive as the main purpose of automation is to help mitigate errors made by people. If I create the branch from the Jira issue then after that, all commits and PRs should be linked to the issue.

Am I missing something? Does it not look at the branch to see if it is linked to an issue?

Do we expect every developer to remember to add that key every commit and every PR?

Like # people like this

@Mikael Sandberg - This is a broken, and not thoroughly considered solution from my perspective, which is causing massive issues when creating Jira filter queries based on pr status (especially bad when releasing). Here's the main problem with this design: By default, Jira branch names include the issue key, and by default the BitBucket pull request commit message includes the branch name. So, we have Jira issues with branches, and pull requests created from them, then merged and closed, now showing up on other unrelated Jira issues, because any branch off of develop which "refreshes" from the main integration branch (develop), will then pick up those merge commits which contain the Jira Issue ID/branch name, causing a closed ticket in Jira to show open pull requests, and additional branches associated with it, even if that isn't the case. I'm thinking the most complicated manner to fix this issue is to require either a rebase when "refreshing" from develop (rebasing, though sometimes a very useful strategy, is absurdly complex when you have a monolithic codebase of over 8 million LOC, and over 200+ developers). I wish instead that the default bitbucket branch commit history, which I'm assuming is what is being implemented by the REST caller from Jira to BitBucket, instead used a default --first-parent, or even a git log HEAD ^develop type of filter so as not to include all the commits which have occurred on the integration branch. If there is some configuration setting to avoid this, I would love to know it. Please help, or at the very least, consider this a defect, and FIX IT. :-)

Suggest an answer

Log in or Sign up to answer