I'm working on a Jira automation that moves issues to the 'Code Review' status. My problem is that a single Jira issue in my project can be associated with multiple reports and have numerous branches and pull requests (PRs).
I want the issue to transition to the 'Code Review' status only when all associated branches have an open pull request. I've attempted to set conditions based on the development fields in Jira Query Language (JQL), explicitly using development[branches].all and development[pullrequests].open. Still, Jira doesn't support a direct comparison between these two.
How can I set a condition to ensure all associated branches of a Jira issue have open PRs before it transitions to 'Code Review'? I'm looking for a solution that doesn't involve manual tracking.
Any guidance or workaround suggestions would be greatly appreciated!
Hi @Tomerh2001
Welcome to the Atlassian Community!!!
You can create two automations:
But first, create a custom field of type Select List (single choice) called ex: Pull
with Yes and No values
First Automation
Trigger: When pull request is created
Then: Edit issue (Pull field)
Second Automation:
1) Trigger: When Field value changed (Pull)
2)If/Else
Choose condition Ex: Projects
3) Branch rule / related issues
For linked issues: All
4) Issue fields condition
Field: Pull
equals Yes
5) Transition issue:
Then: Code Review
In the second automation, check the box "Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule."
See the results:
I hope it helps!
Regards,
Anthony
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.