Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Automation for updating fixVersion based on commit branch

khenson March 18, 2024

Hi, I am trying to figure out how to update Jira tickets with a fixVersion based on the branch the git commit was merged into using Jira Automation. I am having trouble finding additional documentation on what JQL commands can be used so that I can use a IF{JQL} component. Please link any documentation and/or a JQL that would help me in this situation.

Ex:
“development[pullrequests].open = 0” as JQL gives me filter results
“development[pullrequests].closed = 0” as JQL does not give me filter results
I am trying to figure out how to do something like " development[pullrequests].branch = currentBranchName

 

This page seems to have some info, but not all of what I am looking for. https://support.atlassian.com/jira-work-management/docs/jql-developer-status/

Thanks

3 answers

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2024

Hi @khenson 

With the pull request merged trigger, please see these smart values to learn the name of the branch:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/#--Pull-request--

Kind regards,
Bill

0 votes
khenson March 19, 2024

Removed

0 votes
Laurie Sciutti
Community Champion
March 18, 2024

Hi @khenson and welcome to the Community!  Have you looked at the DevOps triggers in Automation Rules?  

Capture.PNG

khenson March 19, 2024

Hi Laurie,

 

Yes. Though my issue lies with the IF statement. I am looking to do:

When: Pull Request Merged

If: (Commit branch = master)

Then: Update fixVersion to include 1.0.0

 

Screenshot from 2024-03-19 17-18-52.png

 

I assume I either need smart value or JQL, but have not been able to find the right query syntax Note that we currently use GitKraken. When following these instructions, I am not able to see the branch information. 

Thank you,

KC

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events