Is it possible to automate the creation of a ticket every other sprint?

David Brown April 9, 2024

I have automation to create new tickets every time a sprint is created and it works great. Now I would like to automate the creation of a ticket every other (well, in my case, every third) sprint.

I tried to use an If block based on the sprint.id smart value like this:

CleanShot 2024-04-09 at 17.32.04.png

 

{{sprint.id}} % 3

equals

0

but it doesn't trigger. I tried hardcoding "9 % 3" and it still doesn't trigger. So I'm thinking math doesn't work in that field.

Is there a way to accomplish what I'm hoping to do? I've seen regular expressions that try to do modulo calculations and they aren't pretty, but I do see that the When: Sprint Created block has a regular expression filter that could work.

2 answers

1 accepted

1 vote
Answer accepted
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 10, 2024

@David Brown I built a rule to debug this for you. I ask the user to enter an "ID", then calculate the modulo 3 value. If it equals to zero, then I write a log message to the audit log.

This works as expected:

Audit-log-Automation-Jira.png

If you look at the "If" block you can see what expression I used. You can probably rework yours based on this.

David Brown April 10, 2024

Thank you for this very informative answer! As I'm sure you can tell I'm relatively new to Jira automation and completely missed the {{#=}} for math expressions. I also didn't realize there was a way to log to the audit log. You've opened a whole new world to me.

Like Aron Gombas _Midori_ likes this
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 11, 2024

Happy to hear that it was useful!

Yea, writing to the log is a great way to "debug" an automation rule.

0 votes
David Brown April 9, 2024

Every other sprint isn't too bad:

 

Sprint [0-9]*[0,2,4,6,8]$

 

but every third sprint?

Suggest an answer

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

Atlassian Community Events