Hi
I want to use automation to send an email and the text should vary based on the value of a select list field. The values are 1-10.
I have it working for values greater than or equal to 7:
Risk: {{#if(issue.Risk.value.asNumber.gte(7))}} High risk {{/}}
But I would like it to say 'Medium Risk' if the value is less than 7 but greater than or equal to 4, and I can't get this working. For example this -
{{#if(issue.Risk.value.asNumber.lt(7))&& (issue.Risk.value.asNumber.gte(4))}} Medium Risk {{/}}
leads to this error:
Error rendering smart-values when executing this rule:Tokens must be separated by '.': && (issue.Risk.value.asNumber.gte(4)): Risk: {{#if(issue.Risk.value.asNumber.gte(7))}} High Risk {{/}} {{#if(issue.Risk.value.asNumber.lt(7))&& (issue.Risk.value.asNumber.gte(4))}} Medium Risk {{/}}
What changes do I need to make?
Thanks
Hi @Julia Foden
Have you tried nesting the tests? Perhaps something like this (assuming your field is called Risk and appears to be text):
{{#if(issue.Risk.value.asNumber.gte(4))}}{{#if(issue.Risk.value.asNumber.lt(7))}}Medium Risk{{/}}{{/}}
And maybe skip the && and just put all the tests end to end, knowing that at least one of them will evaluate to True.
Updated: sorry I left story points in my first example. :^)
Best regards,
Bill
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.