-
Suggestion
-
Resolution: Unresolved
Issue Summary
According to the article conditional-logic/#or, it is currently possible to check for two conditions using the 'OR' or 'AND' condition logic, however, it is not possible to check for more than two conditions.
Steps to Reproduce
- Create an Automation rule
- Specify below conditional smart value
{{#if(or(smartValue1, smartValue2, smartValue3))}} returned value {{/}}
- Check audit log
Expected Results
If any one of the smartValue1, or smartValue2 or smartValue3 return true, it should return true.
Actual Results
The evaluation process is skipped and nothing is done.
Workaround
1. Specify like below:
{{#if(smartValue1)}} returned value {{/}} {{#if(smartValue2)}} returned value {{/}} {{#if(smartValue3)}} returned value {{/}} {{#if(smartValue4)}} returned value {{/}}
—
2. Use if/else conditional block
[AUTO-1643] Add support for 'AND' and 'OR' conditional logic smart value for more than two conditions
Description |
Original:
h3. Issue Summary
According to the article [conditional-logic/#or|https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/#and:~:text=Popular%20issue.-,or,-Syntax], it is currently possible to check for two conditions using the '{*}OR'{*} condition logic, however, it is not possible to check for *more than* two conditions. h3. Steps to Reproduce # Create an Automation rule # Specify below conditional smart value {code:java} {{#if(or(smartValue1, smartValue2, smartValue3))}} returned value {{/}} {code} # Check audit log h3. Expected Results If any one of the smartValue1, or smartValue2 or smartValue3 return true, it should return true. h3. Actual Results The evaluation process is skipped and nothing is done. h3. Workaround 1. Specify like below: {code:java} {{#if(smartValue1)}} returned value {{/}} {{#if(smartValue2)}} returned value {{/}} {{#if(smartValue3)}} returned value {{/}} {{#if(smartValue4)}} returned value {{/}} {code} --- 2. Use if/else conditional block |
New:
h3. Issue Summary
According to the article [conditional-logic/#or|https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/#and:~:text=Popular%20issue.-,or,-Syntax], it is currently possible to check for two conditions using the '{*}OR'{*} or '{*}AND{*}' condition logic, however, it is not possible to check for *more than* two conditions. h3. Steps to Reproduce # Create an Automation rule # Specify below conditional smart value {code:java} {{#if(or(smartValue1, smartValue2, smartValue3))}} returned value {{/}} {code} # Check audit log h3. Expected Results If any one of the smartValue1, or smartValue2 or smartValue3 return true, it should return true. h3. Actual Results The evaluation process is skipped and nothing is done. h3. Workaround 1. Specify like below: {code:java} {{#if(smartValue1)}} returned value {{/}} {{#if(smartValue2)}} returned value {{/}} {{#if(smartValue3)}} returned value {{/}} {{#if(smartValue4)}} returned value {{/}} {code} — 2. Use if/else conditional block |
Summary | Original: Add support for OR conditional logic smart value for more than two conditions | New: Add support for 'AND' and 'OR' conditional logic smart value for more than two conditions |
Description |
Original:
h3. Issue Summary
According to the article [conditional-logic/#or|https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/#and] ,it is currently possible to check for two conditions using the '{*}OR'{*} condition logic, however, it is not possible to check for *more than* two conditions. h3. 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: {code:java} {{#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 {{/}} {{/}}{code} # When we use the 'AND' conditional operator to check for more than two conditions, the condition is not successful Example: {code:java} {{#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 {{/}} {{/}}{code} h3. 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. h3. Actual Results When we use the 'AND' conditional operator to check for more than two conditions, the condition is not successful h3. Workaround Currently, there is no known workaround for this behavior. A workaround will be added here when available |
New:
h3. Issue Summary
According to the article [conditional-logic/#or|https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/#and:~:text=Popular%20issue.-,or,-Syntax], it is currently possible to check for two conditions using the '{*}OR'{*} condition logic, however, it is not possible to check for *more than* two conditions. h3. Steps to Reproduce # Create an Automation rule # Specify below conditional smart value {code:java} {{#if(or(smartValue1, smartValue2, smartValue3))}} returned value {{/}} {code} # Check audit log h3. Expected Results If any one of the smartValue1, or smartValue2 or smartValue3 return true, it should return true. h3. Actual Results The evaluation process is skipped and nothing is done. h3. Workaround 1. Specify like below: {code:java} {{#if(smartValue1)}} returned value {{/}} {{#if(smartValue2)}} returned value {{/}} {{#if(smartValue3)}} returned value {{/}} {{#if(smartValue4)}} returned value {{/}} {code} --- 2. Use if/else conditional block |
Description |
Original:
h3. Issue Summary
According to the article [conditional-logic/#and|https://support.atlassian.com/cloud-automation/docs/jira-smart-values-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. h3. 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: {code:java} {{#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 {{/}} {{/}}{code} # When we use the 'AND' conditional operator to check for more than two conditions, the condition is not successful Example: {code:java} {{#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 {{/}} {{/}}{code} h3. 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. h3. Actual Results When we use the 'AND' conditional operator to check for more than two conditions, the condition is not successful h3. Workaround Currently, there is no known workaround for this behavior. A workaround will be added here when available |
New:
h3. Issue Summary
According to the article [conditional-logic/#or|https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/#and] ,it is currently possible to check for two conditions using the '{*}OR'{*} condition logic, however, it is not possible to check for *more than* two conditions. h3. 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: {code:java} {{#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 {{/}} {{/}}{code} # When we use the 'AND' conditional operator to check for more than two conditions, the condition is not successful Example: {code:java} {{#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 {{/}} {{/}}{code} h3. 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. h3. Actual Results When we use the 'AND' conditional operator to check for more than two conditions, the condition is not successful h3. Workaround Currently, there is no known workaround for this behavior. A workaround will be added here when available |
Summary | Original: Add support for And conditional logic smart value for more than two conditions | New: Add support for OR conditional logic smart value for more than two conditions |
Reporter | Original: Rohit Sreedharala [ 9c3330e8be50 ] | New: Jun Itokawa [ d20fb9d86b65 ] |