Hi,
I wrote this smart variable in an automation rule:
myVar =
{{#issue}}{{#if(equals(status.statuscategory.name,"Done"))}}found value{{/}}{{status.statuscategory.name}}{{/}}
When I print it into a log (or use it), on an issue with status category Done, the returned value is always (just) "Done". "found value" is never printed.
The above example is just a simplified version of what I'm doing (though I tested exactly the above example before writing this question, just in case); still, I've tested that this simple usage of if-equals is never working as I'd expect, and I'm wondering what I'm doing wrong.
My goal in the end is to write a variable in the form of an if-then-else structure:
myVar = {{#if(equals(somefield,"yes"))}}0{{/}}{{#if(not(equals(somefield,"yes")))}}1{{/}}
, for instance.
In this way, I may avoid using a lot of if-else branches, that consume my rule 'space' very quickly.
Best regards
Hi @Fede B.
This smart value:
{{#if(equals(status.statuscategory.name,"Done"))}}found value{{/}}
works as expected. If any issue is on Done status it will yield "found value".
What is it that you want to achieve by adding {{#issue}}. Which list do you want to iterate with?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.