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?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.