Details
-
Suggestion
-
Resolution: Duplicate
Description
Issue Summary
According to the article conditional-logic/#and ,it is currently possible to check for two conditions using the 'and' condition logic, however, it is not possible to check for more than two conditions. It is also not possible to nest the and condition as well.
Steps to Reproduce
- Create an Automation rule to check for custom fields of a linked issue
- When we use the 'AND' conditional operator to check for two conditions, it works fine
Example:{{#issue.issuelinks}} {{#if(and( Issue.TEXT_A.equals("AAA") , Issue.TEXT_B.equals("BBB") ))}} YES {{Issue.TEXT_A}} {{Issue.TEXT_B}} YES {{/}} {{#if (not (equals (Issue.TEXT_A, "AAA")))}} OHHH {{Issue.TEXT_A}} {{Issue.TEXT_B}} OHH {{/}} {{/}}
- When we use the 'AND' conditional operator to check for more than two conditions, the condition is not successful
Example:{{#issue.issuelinks}} {{#if(and( Issue.TEXT_A.equals("AAA") , Issue.TEXT_B.equals("BBB"), Issue.TEXT_C.equals("CCC") ))}} YES {{Issue.TEXT_A}} {{Issue.TEXT_B}} YES {{/}} {{#if (not (equals (Issue.TEXT_A, "AAA")))}} OHHH {{Issue.TEXT_A}} {{Issue.TEXT_B}} OHH {{/}} {{/}}
Expected Results
The 'AND' conditional operator should work even if we check for more than two conditions as mentioned in the above example.
(or)
There should be a way to nest the 'AND'/'OR' operator to check for more than three conditions.
Actual Results
When we use the 'AND' conditional operator to check for more than two conditions, the condition is not successful
Workaround
Currently, there is no known workaround for this behavior. A workaround will be added here when available
Attachments
Issue Links
- blocks
-
AUTO-67 Support for more complex logic in Automation rulebuilder, e.g. introduce nested if/else blocks (branches within branches)
- Future Consideration