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?
Have you started the rule yet?
If so, context is important for automation rule questions. Please post the following:
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:
Kind regards,
Bill
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome, and well done!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.