Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to tell if there are multiple pull requests associated with an issue via smart value?

I am trying to create an automation rule that triggers when a pull request is merged that is linked to a jira issue. I want to transition the issue from "In Progress" to "Done". However, I only want to actually transition the issue if ALL of the pull requests associated with the jira issue are merged. If one pull request has been merged, but another is still open, I want the ticket to stay in "In Progress". I know there is an existing smart value {{pullRequest.state}}. Is there a way to get ALL of the pullRequests for the issue, and not just the one being merged?

1 answer

1 accepted

We had the same use case and we used the following to transition an item once all PRs are merged:

WHEN: pull request merged
IF: issue matches JQL
 development[pullrequests].open = 0
THEN: transition an issue to <status>


This is awesome, thanks so much!! Exactly what I was looking for.

Like Artur.Cybruch likes this

Hello @Artur.Cybruch


I have exactly the same issue, but I can't find where to put this code, would you mind to tell me a bit more ?



Had the same issue. If you are looking at the new automation approach then this video from Atlassian might have the answer for you: (1597) How to transition a Jira issue when a pull request is merged - YouTube

@Timothee Grosjean this has to be done by an administrator of your JIRA Cloud as only they would be able to add this to the automation in JIRA. This can be found by going to "Settings" -> "System" -> scroll to the bottom until you can see "Automation Rules" section. Once inside the automation area, your admins would be able to create a rule like this (obviously, this would need to be customised based on your company needs):

automation rules.png

Thanks for the example - works.

Like Artur.Cybruch likes this

Suggest an answer

Log in or Sign up to answer
Site Admin

Community Events

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

Events near you