I'm trying to create an automation that sends a Slack message listing the Jira items that meet a certain JQL query. I was able to set that up with the following objects:
- When: Schedule
- Then: Lookup issues (with JQL query)
- And: Send Slack message
*The following items are open in JIRA*:
{{#lookupIssues}}
* <{{url}}|{{key}} - {{summary}}> [{{status.name}}] ({{assignee.displayName}})
{{/}}
This works great, however it still sends that message even if there are no results from the Lookup's JQL query.
I tried wrapping it in an If-Then condition, but Jira then requires me to add the JQL to the Schedule component. By doing that it will then execute the Send Slack message component every time for each item in the JQL query results (which I obviously don't want to do).
What's the solution here?