Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Mail Automation: wrong filtering

Dousch31
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 23, 2025

Hi everyone,
I'm working on a Jira automation that sends an email listing tickets by category. The section for Unassigned Tickets works as expected. However, the section for Unresolved Tickets doesn't return any results, even though there are tickets with the relevant statuses.

Here’s a simplified example of the part that doesn’t work:

html
Kopieren
Bearbeiten
{{#lookupIssues}}
{{#if(or(equals(status.name,"In Internal Review"),equals(status.name,"Pre-Check"),equals(status.name,"In Progress"),equals(status.name,"Open"),equals(status.name,"Waiting for customer")))}}
<tr>
<td>{{customfield_43012}}</td>
<td><a href="{{url}}">{{key}}</a></td>
<td>{{summary}}</td>
<td>{{assignee.displayName}}</td>
</tr>
{{/}}
{{/}}
The condition doesn’t seem to filter correctly.

Any help would be appreciated
Thanks in advance!

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 23, 2025

Hi @Dousch31 -- Welcome to the Atlassian Community!

The conditional function or() can only take two parameters, and you are trying to use the function as if it can take more:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/#or

 

You have two options for workarounds:

  • Nest the or() functions, such as:
{{#if(or(equals(status.name,"In Internal Review"),
or(equals(status.name,"Pre-Check"),
or(equals(status.name,"In Progress"),
or(equals(status.name,"Open"),
equals(status.name,"Waiting for customer"))))))}}
do something
{{/}}
  • Rather than using or() use a match() function with a regular expression and count the results of the list with the size function.  For example:
{{#if(status.name.match("(In Internal Review|Pre-Check|In Progress|Open|Waiting for customer)").size.gt(0))}}
do something
{{/}}

 

Please confirm / update those examples to meet your specific needs.

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events