-
Type:
Suggestion
-
Resolution: Unresolved
-
Component/s: Condition - Other
-
Jira Software
Currently, we can use the below smart value to access the current item from a specific list.
{{.}}
However, this smart value cannot be used within conditional logic to loop through each element for comparison purposes.
For example, if we create a variable like this:
Variable name : Var Smart value : 3,2,56,4,89,1
We can use the following smart value to access each item in the list:
{{#Var.split(",")}} Each Element: {{.}} {{/}}

However, using the same approach for conditional logic to compare against a specific value results in an error.
{{#Var.split(",")}} Is element greater than 5: {{..gt(5)}} {{/}}
Error received:
"Unable to render smart values when executing this rule: Failed to get value for ..gt(5): {{#Var.split(",")}}Is element greater than 5: {{..gt(5)}} {{/}}"
Workaround:
Instead of using conditional logic for comparisons, we can utilize branching to loop through each element and compare it against the required value.
- Create an "Advanced Branching" setup as follows:
Smart value : {{Var.split(",")}}
Variable name : EachElement
- After this setup, you can use "EachElement", which will hold the current item from the list, and apply "Advanced comparison" to evaluate it against the required value.
First value : {{EachElement}}
Condition : greater than or lesser than etc..
Second value: <Required Value> to compare