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 ?
@Trudy Claspill Wow - Thank you. Who would have guessed the syntax would be different between the cloud and on premise version.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
my error is this:
"error rendering smart-values when executing this rule: unable to parse expression: % 3"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i have that exact text, and it gives me the above reported error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.