Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • How to transition all Jira issues mentioned in pull request commits using the new Jira Flows automat

How to transition all Jira issues mentioned in pull request commits using the new Jira Flows automat

Nika Zupanc
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 17, 2026

Hello,

I am new to Jira automation and any help would be greatly appreciated :)

How can I create a Jira automation so that if a pull request contains multiple commits with different Jira issue keys (for example PS-18, PS-19, PS-20), all of those issues are automatically transitioned to In Progress or Done?

I am currently using the new Jira Flows builder. I managed to create an automation that detects PS- in the PR title or commit messages, but the problem is that the transition only happens for one “main” work item instead of all issues referenced in the commits.

Example:

  • Commit 1: PS-18 Add tests

  • Commit 2: PS-19 Fix validation

  • Commit 3: PS-20 Add auth checks

What I want:

  • all issues (PS-18, PS-19, PS-20) should transition automatically.

Current behavior:

  • Jira seems to detect the commits,

  • but the “Transition the work item” action only transitions one issue.

Does the new Jira Flows builder support iterating through all issue keys found in commits?
Or is the only recommended solution:

  • 1 pull request = 1 Jira issue?

Thanks for the help.

 

 

done.pngin_progres.png

1 answer

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 Champions.
May 17, 2026

Hi @Nika Zupanc 

First, did you confirm the smart value {{pullRequest.commits.message}} actually contains a list of  work item keys?  For example, does:

  • one commit message contain multiple keys, and / or
  • there are multiple items in the list smart value {{pullRequest.commits}} and each contains one or more keys

Let's assume it is one of those, and you want to branch over the keys to transition the work items.

  • You could use the flatten function to combine the messages from all of the commits:
{{pullRequest.commits.message.flatten}}
{{pullRequest.commits.message.flatten.trim.match("(PS-\d+)").distinct}}
key IN ( {{pullRequest.commits.message.flatten.trim.match("(PS-\d+)").distinct.join(", ")}} ) 

 

I wrote those expressions without testing with an actual PR and commits, so please adjust the regex to meet your needs and test accordingly.  Perhaps test by just writing the smart value expression results to the audit log before attempting to transition the work items.

 

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events