You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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?
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, https://confluence.atlassian.com/bitbucketserver/jira-integration-776639874.html
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?
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?
@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. :-)