Automation For Jira - Writing a rule that sends the list of issues about to breach via Slack
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
This article describes how to create an Automation Rule using the Lookup Issues action (available in Automation for Jira from the version 9.0.1), which will send a Slack message in a channel containing the list of requests that will expire in less than 1h.
Environment
- Jira Service Management (JSM) Data Center Only (This article does not apply to Server licenses)
- Applicable JSM / A4J (Automation for Jira) versions:
- JSM 5.11.0 and any higher version (this JSM version ships with A4J 9.0.1)
- OR JSM 4.20.0 and any higher version, in combination with A4J 9.0.1
Solution
Rule configuration details
The rule will need to be configured as follows:
- Add the Scheduled trigger with the settings below:
- Frequency: Once every 30min
- Select the option simply run the conditions and actions without providing issues
Add the Lookup Issues action, with the JQL query below (feel free to change the threshold and the name of the SLA to your liking):
"Time to first response" < remaining ("1h")
- Add the Send Slack message action with the parameters below:
- Webhook URL: Add the Slack URL obtained after configuring an incoming Webhook in your Slack account
Message: Copy the message below, to include the Key, URL, Summary of the requests that are about to breach:
The following support tickets will breach in less than 1h, or already breached: {{#lookupIssues}} - <{{url}}|{{key}}> - {{summary}} {{/}}
- Channel: Enter the name of the Slack channel where you want the message to be sent