We are currently using the “Merge commit” strategy for pull requests. When work for an issue starts, the branch is created from the Jira issue that it applies to. When we complete the changes required for the issue on the branch and accept the pull request to master, the Jira issue number only appears on the single line for the merge commit, and the subsequent commits, on master, that came from that branch have no Jira issue number identified on them. Is there a way to have the issue number tagged on each of the commits that come over from the branch?
Jira and Bitbucket linking is established in the following ways:
If you want the commits within in a branch to be associated with a Jira issue then you need to include the Jira issue key in each commit message.
Thanks for the details Bryan. Sounds like we'll have to put the issue key on each commit. I was hoping for a Jira feature to be able to automatically apply the issue key based on the branch that was created by that exact issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That would be a nice feature, but it's not the case. Feature branches are normally understood to be transient. Once you've merged the branch into develop or master it's not needed anymore and can be deleted. After deletion there's no branch to link back to the associated issue which is why including the issue key in the commit message is important.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Commits are essentially immutable, especially after they've been merged into a mainline, and so such a feature would be awkward to implement.
The free add-on, Control Freak for Bitbucket Server, is a great way to force all commits to have JIRA references before they get merged.
(If I may so myself...) ;-)
The add-on assumes you've properly linked your JIRA instance to your Bitbucket instance via the "Application Links" feature of both.
- Sylvie
(We maintain three add-ons: 1. Control Freak, 2. Git Graph for JIRA, 3. Rebase Squash Amend.)
p.s. By the way, the 3rd one, Bit-Booster - Rebase Squash Amend, makes it really easy to quickly fix commits that are missing their JIRA reference - just hit the "Amend" button this plugin adds to the PR screen.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.