How to return string from math expression?

konstantin.vasilev
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!
October 25, 2020

I have a math expression in a Jira automation and want depending on a numeric smart value to return string as result:

 

{{#=}} IF({{var}}=1,"One","NotOne") {{/}}

 

Error: Error rendering smart-values when executing this rule: Unable to parse expression

 

I tried with different quotes. Escape symbols and searching for functions...

1 answer

1 vote
Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 2, 2020

Hey @konstantin.vasilev ,

I'm afraid that you can only use numbers with the math IF, like so:

{{#=}}IF(true, 1, 0){{/}}

It isn't possible to use Strings as the two options I'm afraid.

Cheers,

Simeon.

Suggest an answer

Log in or Sign up to answer