Hi all, I hope you can help with a problem I've been grappling with for a couple of days now.
I am trying to run a JQL query on a Jira project to see if it has any issues that match a criteria - which seems to work OK. Here is an example where 2 issues are found:

Then I use an If block (Advanced Compart Condition) to see if the value is greater than or does not contain 0. I am using either 0 or <Empty> as the value in this compare condition. But whatever options I try I cant get it to send an email if there is an Issue that meets the criteria and not if it doesn't.
See below example of a project with 2 issues that meet the criteria and I use {{lookupIssues.size|0}} greater than <EMPTY> which actually gives the correct response.

But when I use it on a project with no issues it still sends out an email.

Another example is when I use {{lookupIssues.size|0}} does not contain 0 for a project with 2 issues that meet the criteria ... but this does not send an email out.

Can anybody help and advise at all the best approach to automate sending an email if there are Issues that match a criteria within a Jira Project?
I've also done some analysis of the output of several variants of criteria (see below):
