I like Jira's feature of auto-linking a branch to a task if the branch has the same name as the task's code, however I have branches that were created before I used Jira and I am not inclined to rename them. Is there a way to link these branches to a task manually?
I understand that you are using Github along with Jira and are looking for more information in regards to making those Github branches appear within Jira's developers tools section. To the best of my knowledge there is no way to make those branches appear within that Jira issue without the Jira issue key itself appearing within the name of that branch somewhere. I know that is probably not the answer you were hoping for here.
We have some more detailed documentation that explains how this works over in Integrating with development tools: How it works. From that page it explains how the various repo elements (ie commits, branches, pull requests, etc) can be made to appear within Jira:
When development tools are integrated with Jira Software, a developer simply needs to supply an issue key for the issue to be automatically linked:
Commits are linked automatically if the issue key is included in the commit message.
Branches are linked automatically if the issue key is included in the branch name.
Pull requests are linked automatically if the issue key is included in the pull request's title or in the source branch name.
Reviews are linked automatically if the issue key is included in the title of the review, or if the issue is linked from the review.
Build linking depends on the tool:
Bamboo: linked automatically if the issue key is included in the commit message.
- Pipelines: linked automatically if the issue key is included in the branch name.
Deployments are linked automatically if a commit involved in the build has the issue key in its commit message.
In short, it can't do what I think you are looking for here.
Normally for these kinds of requests, we would link to an existing or build a new feature request on jira.atlassian.com in the hope that perhaps someday this functionality might come to the product. In fact one already exists for Jira Cloud in regards to Bitbucket for this similar feature, see JSWCLOUD-18105.
However in this case, at least for Jira Cloud sites, Atlassian no longer is providing the code to connect Jira Cloud to Github. Instead, about a year ago, Atlassian partnered with Github and in turn Github is now providing the addon for Jira Cloud sites to be able to connect to Github.
So in this case, if you're looking for a feature request on what that addon can do within Jira, I would recommend reaching out to Github support link on the Marketplace listing. Perhaps they can extend the functionality of their addon in some way to provide a better solution here.
I hope this helps.
Thanks for such a detailed reply, I didn't know that commits could also be linked to an issue via their key.
This won't be a problem for me, only the first few issues/tasks I created already had branches, and now that they are all completed I am in full Jira mode concerning branch names.
All the best,
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