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

No jira issue linked to pull request

Bohdan March 25, 2021

Hi! How automatically linked Jira issues when making a pull request.?  https://prnt.sc/10vatrg

I  have made integration with jira https://prnt.sc/10vazyo But still no issues there

1 answer

1 accepted

1 vote
Answer accepted
Esther Strom
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 25, 2021

Hi, @Bohdan

The easiest way to create a link between a ticket and a pull request is to just set your branch's commit message to have the Jira ticket number be the first thing in the commit.

git commit -am "JIRA-123 this is my commit message"

This will result in a link from this commit/branch to the jira ticket called JIRA-123.  

devynfarr November 3, 2021

Ok that's the easiest way.  Are there other ways? 

What if the commit message didn't include the proper ticket number, but I still want to create the link between the issue and the P/R?

 

So far the only solution I've come up with is creating another commit to the P/R branch simply to mention the ticket number.  Kinda awkward.

Esther Strom
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 3, 2021

The full documentation on how development tools are linked to Jira tickets.

devynfarr November 4, 2021

This was not very helpful.

The link states the following options for a P/R:

  1. Include a commit in the pull request that has the issue key in the commit message. Note, the commit cannot be a merge commit (this is the dummy commit option i mentioned above).
  2. Include the issue key at the beginning of the pull request title. (only works for 1 issue, and is misleading since a "forgotten" or "late addition" issue is likely a minor one in the context of the P/R, not worthy of being in the title)
  3. Ensure that the source branch name also includes the issue key at the beginning of the branch name.  (not something you'd change after the fact just to connect a missed jira issue)

These are all equally non-ideal options.  Thankyou for digging up that document.  I'll have to impress upon my team the seriousness of getting their commit messages right the first time.

Like # people like this
Esther Strom
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 17, 2022

I don't have anything helpful to say about 1 and 3, but 2 is incorrect. You can connect multiple tickets to a single pull request by including all ticket numbers at the start of your commit message:

git commit -am "JIRA-123 JIRA-234 JIRA-345 link multiple tickets"  

(It's been a while since I've done this as I'm no longer a dev; you may need to comma-separate the ticket numbers, but I don't think so.) 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events