Forums

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

Assingee rotate per week

Leon
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!
July 22, 2025

I've follwed this post here: 

Solved: Pick a new assignee each work week for a new ticke...

however for me it does not work as I get an error on all three of my If blocks.

"error rendering smart-values when executing this rule: unable to parse expression: % 3"

To me it look like the smart values are not being enumerated correctly as the maths is failing.

I've tried changing smart values from {{now.format("w").asNumber}} 

to

{{now.weekOfYear.asNumber}} and that also gives the same error.

the automation rules look just like the example. Any idea what is wrong ?

2 answers

0 votes
Leon
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!
July 22, 2025

@Trudy Claspill Wow - Thank you. Who would have guessed the syntax would be different between the cloud and on premise version. 

Trudy Claspill
Community Champion
July 23, 2025

You're welcome.

If my replies helped you achieve your goal and solve your problem, please consider clicking on the Accept Answer button above my replies. That will mark your Question as Solved. That helps other people searching for answers find the Questions that have validated solutions.

0 votes
Trudy Claspill
Community Champion
July 22, 2025

Hello @Leon 

Welcome to the Atlassian community.

When asking for help with an Automation Rule it will enable us to help you more effectively if you provide the following.

1. Screen images that show your complete rule.

2. Screen images that show the details of complex steps like comparisons, branches, and steps that include JQL or Smart Values.

3. The full details from the Audit Log for an execution of the rule, showing exactly what occurred and any messages generated.

In this case there are two different answers provided on the referenced question and it is not entirely clear which one you were trying to implement.

Leon
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!
July 22, 2025

Trudy, i cant do that as its running on-premise without internet access. so the error message is the best i can get at the moment.

Trudy Claspill
Community Champion
July 22, 2025

Can you not capture screen images from your browser on your device (laptop) and paste those images into a reply in this post?

Can you copy the images from the referenced post and repost them here and include details on how your actual rule differences in any ways from what is available in those images?

Leon
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!
July 22, 2025

I CAN NOT get any data from the affected system.

My rule is exactly as per the image attached and taken from the the original thread, however i get the error as posted in the opening post of this thread.

Leon
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!
July 22, 2025

Screen Shot 2023-03-27 at 10.55.30 AM.png

Leon
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!
July 22, 2025

my error is this: 

"error rendering smart-values when executing this rule: unable to parse expression: % 3"

Trudy Claspill
Community Champion
July 22, 2025

Thank you for that additional information @Leon . It is very helpful to have a shared understanding of exactly what you are working with.

I have tested the exact same text provided in the referenced rule:

{{#=}}{{now.format("w").asNumber}} % 3{{/}}

Can you double check that your text matches exactly? Carefully examine it to confirm you are using curly braces everywhere except for the parentheses around "w". Make sure the curly braces are always in pairs. Double check that you don't have any extra spaces. Make sure that you have used the same upper/lower case.

If you can, take the above text and copy/paste it into your rule, then try running your rule again to see if it works.

Leon
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!
July 22, 2025

i have that exact text, and it gives me the above reported error.

Trudy Claspill
Community Champion
July 22, 2025

I got it!!

You said you are "running on-premise", which I assume means you are running Jira Data Center.

The solution in the referenced post is based on Jira Cloud.

In Jira Data center the expression needs to use slightly different syntax. I tested the following in Jira Data Center 9.2.17 and it works.

{{#=}} {{now.format("w")}} % 3{{/}}

Notice the curly braces are just around the smart value, not around the entire Modulo math expression.

Also, .asNumber doesn't seem to work in Jira Data Center, but it turns out not to be necessary in this formula.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events