Forums

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

Message to Automation Email When Query Results Zero

Curt Cavazos February 9, 2024

While it's easier to allow queries to stop when the results are zero, I'd like them to still run and I would like to add a message to the effect "There were no records matching this query found".  Can you help me devise this?  

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.
February 9, 2024

Hi @Curt Cavazos 

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

As you appear to be using the Jira Server version of automation rules, you may be using the bulk-handling feature with the {{issues}} smart value (noting that is plural for the list of issues).

To check if the results are empty, you may check the size of the list:

{{issues.size|0}}

However if you are using a scheduled trigger rule with JQL, the rule should not run when no issues match.  Seeing the specifics of your rule and audit log may help explain what is happening.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer