Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to execute only if Lookup Issues returns one more more issues

I want to send a daily reminder listing a summary of tickets, but I only want the daily reminder to be sent if there are issues matching my JQL query. As I have it configured, an email is sent with no list if the query returns empty. 


Is there some way to set a condition so that my email only sends if the Lookup issue action returns one or more issues?


Screen Shot 2020-09-25 at 5.54.11 AM.png

2 answers

1 accepted

5 votes
Answer accepted

I was searching how to do exactly this which led me to this topic. Somehow playing with the rules I managed to resolve it myself and I'd like to share it with you.

You must add an Advance compare condition just after a Lookup issues action with the next configuration:


This will validate that lookupIssues must not be empty in order to trigger the following steps.

Reply if this worked for you so others can make use of it, have a nice day :)

Oddly enough, I just discovered that the lookupissues smart value existed the other day. This is a fantastic use of it, and I never would have considered it. Thanks!

Hi I've made use of this and it's great. However I've been trying to generate a different notification when the list IS empty. So tried switching the rule around so that the Condition matches Empty. This however brings up an error when the list is empty, but strangely it doesn't generate an error when the list isn't empty. Does anyone know how I can fire off a rule for when {{lookupissues}} is empty?

Just trying to say something like "There are no logged issues todayjira_lookupissues.JPGjira_lookupissues3.JPGjira_lookupissues2.JPG

The comparison configuration you show above won't work, because it's going to look for the string "Empty". In the dropdown where you see "contains" there should also be an option for "is empty". That will allow you to check if the lookup found anything or not.

Sadly there is no option for "is Empty" in the Advance Compare option. This is what I get.jira_lookupissues4.jpg

How strange. It only appears in the issue fields condition. Sorry about that. In this case, I'd try "does not match regular expression" and use the regex


That regex searches for any character. So long as the field is empty, the condition "does not match" should work for you. 

Like Daniel Landino likes this

Hi Greg - thanks for all your help with this. Still struggled to get what I needed to happen until I stumbled across the following Lookupissue feature.

{{lookupissues.size}} - this gives the result of how many issues are looked up. 5 issues looked up? then the size is 5. No issues looked up, the size is 0.

As such I simply used an advanced compare for my two rules. One if it returns issues (Grab below), and another for no issues (change the condition below to equals). I've made two separate rules but I presume an branched IF Advanced compare condition could contain everything in one rule. Hope this helps someone in the future.

FYI on the grab below you can use does not equal, or greater than - both do the same thing when trying to see if a there are any issues. The example below will not trigger any actions if lookupissues returns nothing.


Like # people like this
0 votes

I wouldn't do this with automation, I would run that search, save it as a filter and then subscribe to it, setting the "do not email me on no issues returned" flag.

Sorry, my initial description of results was a bit unclear. I need a summary to be emailed to the approvers each morning, and it needs to be a bit more user friendly than a filter subscription email.

Also need this for automations that do not involve email; and this cannot be done with subscriptions.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events