The "create branch" example contains a space, but git does not allow spaces

T October 28, 2016

This question is in reference to Atlassian Documentation: Referencing issues in your development work

The "create branch" example in the "Referencing issues in your development work" section of the documentation contains a space, but git does not allow spaces in branch names!  I tried using an underscore in between the Issue ID and the other text, but JIRA didn't pick it up.  How do you get JIRA to pick up the issue number within the name of the branch with JIRA doesn't seem to pick the issue number up when the branch name is of the form "eng_AI-12345" or "eng-AI-12345-fix_widgets"?

2 answers

0 votes
paulwatson
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 1, 2016

Thanks Thomas, I've updated the page (and a few related pages too).

0 votes
Benjamin Morgan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 1, 2016

Hi Thomas,

What development tool are you integrating with JIRA and what version of JIRA? If you can log a support ticket the support team can help investigate further.

The formats you have described should work, although you could try prefixing it with the issue key, i.e. AI-12345_description 

If you want the username first you can use 'username/AI-12345_description'

Another way to create the branch is from within JIRA itself which will automatically populate the issue key into the branch name.

Ben

T November 1, 2016

We are using hosted JIRA v1000.482.3 at corpname.atlassian.net with GitHub.

Why is it necessary to use AI-12345_fixwidgets instead of eng_AI-12345_fixwidgets?  Your documentation does not indicate such a requirement:

Include the issue key in the branch name when you create the branch.

For example, if you name your branch "TIS-2_feature", the TIS-2 issue in JIRA will automatically transition from 'To Do' to 'In Progress'. (Note that Git doesn't allow spaces in branch names.)

Perhaps the documentation could be updated if this is, indeed, a requirement?

Also, since the Pull Request has already merged at this point, how can I provide a link to the GitHub issue (or branch, or commit) in a JIRA comment that will get picked up and shown in the Development section of the Issue?  I'm not seeing an explanation in the documentation of how I can provide a Pull Request number in an Issue comment that will be interpreted as such.

Thank you for your assistance.

Benjamin Morgan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 2, 2016

Are you able to log a support ticket (https://support.atlassian.com)? I've poked around and it should be working with eng_AI-123_fix as the branch name or PR name, support could take a deeper look then.

Unfortunately there is no support for linking in Github issues into the dev panel section of the issue. Once the PR is closed.

T November 2, 2016

Is there no way to link to a Pull Request or a commit in a comment on an Issue, then?  That seems like at least as common of a use case as linking to the Issue in the git commit comment or the GitHub Pull Request.

Benjamin Morgan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 3, 2016

The dev panel shows information based on the integrations, there is currently no support for manual association.

You might be able to rename the pull request to be picked up, but I'm not sure if you can rename merged PRs.

If you are looking to link a Github issue to the JIRA issue you could use the issue links to create a web link (https://confluence.atlassian.com/display/JIRASOFTWARECLOUD/Linking+issues) in the JIRA issue to your Github issue, these would show in the main issue view.

 

Suggest an answer

Log in or Sign up to answer