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?
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 today
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sadly there is no option for "is Empty" in the Advance Compare option. This is what I get.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also need this for automations that do not involve email; and this cannot be done with subscriptions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.