Hello!
I need to filter down a list in our automation, Any suggestions welcomed!
Currently I'm using -- {{#Issues}}{{#if(equals(status.name, "Approved"))}} {{/}}
But I need to narrow it down to only show items from Project XYZ
I'm not sure how to combine two different fields. I tried
{{#Issues}}{{#if(and(status.name, "Approved", project.key, "PP"))}} {{/}}
{{#Issues}}{{#if(and(equals(status.name, "Approved", project.key, "PP")))}} {{/}}
Documentation Shows the following for "and" but doesn't speak on combining two fields - {{and(smartValue1, smartvalue2)}} returns true or false {{#if(and(issue.Votes.gt(100),issue.Votes.lt(150)))}} Moderately Popular issue {{/}}
Hi @Melissa
The and() function in smart value expressions takes two Boolean parameters; basically, any expressions which could evaluate to true or false.
In the documentation example, the gt() and lt() functions return those Boolean values.
For your case, perhaps try using two equals() functions within the and() function:
{{#issues}}
{{#if(and(equals(status.name, "Approved"), equals(project.key, "PP")))}}
return something...
{{/}}
{{/}}
Please note well: the and() / or() functions only take two parameters. When more expressions are needed, they must be nested. Such as with this:
{{#issues}}
{{#if( and(myFirstExpression, and(mySecondExpression, myThirdExpression) ) )}}
return something...
{{/}}
{{/}}
Kind regards,
Bill
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.