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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

2 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. 

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.


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
Community showcase
Published in Marketplace Apps & Integrations

🤺 Atlympic Event: Partnerships

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

191 views 3 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you