I have an automation rule looks up issues via JQL, sends an email, and then transitions those issues to a status. When issues are returned from the JQL, the automation runs perfectly. However, when there are no issues, the automation runs like I want it to but returns an error (and thus sends me an error email). From what I can tell, I cannot wrap the branch around an IF condition {{lookupIssues}} is not empty to prevent the error. For my own awareness, I do not want to disable error notifications when this rule fails in case there are other issues at some point. Is there some way that I can adjust this logic to not throw errors when no issues are returned in the lookupIssues for the branch? This is a JWM project in case that makes a difference.
My logic....
Scheduled at 2am
Then: Lookup issues - search for issues using JQL
project = XXXX and type = "Sub-Task" and status = XXXXX ORDER BY due ASC
If: matches
{{lookupIssues}} does not equal Empty
Then: Send email
Else
Then: Add value to the audit log.
no email sent
BRANCH
For: JQL
key in ( {{lookupIssues}} )
Then: Add value to the audit log.
If status equals
My Status
Then: Transition the issue to
My Next Status
............
Audit Log
Lookup issues
A search during custom value definition found no issues.
Else block
Else block executed
Log action
Log
No email sent
Branch rule / related issues
Error searching for related issues. This is most likely because the following issues don't have a related issue of the type you specified. Try narrowing your search to only include issues that contain links to related issues:
NO ISSUE: "(key in ( )) AND (project in (14232))" - Error in JQL Query: Expecting either a value, list or function but got ')'. You must surround ')' in quotation marks to use it as a value. (line 1, character 12)
Is there any way that I can adjust this logic to not throw errors when no issues are found to transition?