Forums

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

Add fixVersion when multiple unreleased versions exist by regex

Michael Garrett
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!
November 26, 2025

I want to produce an automation am I'm having trouble piecing it together. I have a full stack team that produces work for Android, iOS and Web. What I want is:

WHEN an issue is transitioned to 'Ready for Testing'

IF Platform = 'iOS' 

THEN edit issue and set fixVersion to <latest unreleased version that starts with iOS>

 

I would then need to do the same for Android. Can this be done?

1 answer

1 accepted

4 votes
Answer accepted
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.
November 26, 2025

Hi @Michael Garrett 

Have you started the rule yet?

If so, context is important for automation rule questions.  Please post the following:

  • what version of Jira are you using: Cloud, Server, or Data Center
  • for Cloud, what type of project is this: company-managed, team-managed, JPD, etc.
  • an image of your complete automation rule in a single image for continuity
  • images of any relevant actions / conditions / branches
  • an image of the audit log details showing the rule execution
  • explain what is not working as expected and why you believe that to be the case

Until we see those...

 

The automation action to edit a work item, and update the Fix Versions field, does not support using a mask or regex to select the next version.  Instead, a workaround is required using the REST API endpoints and the Send Web Request action:

  • use the Send Web Request action to get all of the active versions matching your criteria
    • If your criteria does not align well with the endpoint parameter method...
    • Filter the response using a regular expression to get your version(s); this will likely require a Created Variable to build a dynamic regular expression and the match() function...or a series of conditions in an IF / ELSE block
  • update the work item's Fix Version using a dynamic JSON expression in the edit

 

Kind regards,
Bill

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.
December 18, 2025

Hi @Michael Garrett -- Welcome to the Atlassian Community!

Just following up to check if this answered your question.  If so, please consider marking this one as "answered".  That will help others with a similar need find solutions faster.  If not, please let the community know what help you need with the rule changes.

Thanks!

Michael Garrett
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!
December 23, 2025

Hey @Bill Sheboy sorry for the late reply. The notification emails went into quarantine so I didn't see them until recently. 

I figured it out with your links. I created a step with a Web Request action and then fed that into the next step to Create Variable. It took a while to figure out the combination of smart values to make it work but this is what I landed on:

{{#webResponse.body.values}}{{#if(and(and(releaseDate.toDate("yyyy-MM-dd").isBefore(now.withNextDayOfWeek("MON").withNextDayOfWeek("FRI")),releaseDate.toDate("yyyy-MM-dd").isAfter(now.withNextDayOfWeek("MON"))), name.startsWith("Android")))}}{{name}}{{/}}{{/}}

Our releases are weekly and on (mostly) predetermined dates, so this filters the full list of releases to JUST the ones releasing the following week and further refining it to the one that starts with 'Android'. I create a follow up action to save another variable for the 'iOS' release too. The tricky part was the `releaseDate` isn't actually a date object so I spent a bunch of time performing date-based operations on that field that didn't work. `toDate` saved me there.

The last bit was an Edit Work Item action. This is what I put in for Additional fields for android stories:

{
"fields": {
"fixVersions": [{{androidReleaseVersion.asJsonObject("name")}}]
}
}

Thanks for pointing me in the right direction!

Like Bill Sheboy likes this
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.
December 23, 2025

Awesome, and well done!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events