I'm trying to set up an automation rule in my Discovery project with a 'create variable' action using an IF formula.
This is what I entered, but I keep getting 'Parameter not closed' errors, but I don't know what I'm doing wrong!
{{#if({{issue.customfield_10105}}.lt(3),{{issue.customfield_10105}},{"0 - {{issue.customfield_10105}}*100")}}{{/}}
This is the IF formula i am trying to create:
I'd be grateful if anyone can help me!
Hi @Silas Campbell -- Welcome to the Atlassian Community!
You appear to be trying the format of if() function which has true / false values: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/#if
That format is this: {{if(smartValue, "value if true", "value if false")}}
Please note there is no pound sign # before the if() and once inside of the expression, no additional curly brackets are needed. Also, you cannot use a literal value of 0 directly as the expression values are text and not within a math expression.
You seem to want to negate the field value and multiple by 100 for the "false" case, so perhaps try this instead:
{{if(issue.customfield_10105.lt(3), issue.customfield_10105, issue.customfield_10105.multiply(-100))}}
Kind regards,
Bill
At the American Academy of Family Physicians, siloed marketing teams faced delays and duplicate work. Kerrie Gottschalk shook things up by moving the department to Jira, streamlining processes, boosting visibility, and sparking stronger collaboration.
Read the story
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.