This guide will detail how to create a new automation rule that searches for overdue issues once a day, sends a Slack reminder to the team, and adds a comment to the issue. You will need an active Jira project.
Step 1. Create a rule
Navigate to the Automation space in your project settings. In the Rule tab, click on the Create rule button in the top right corner of the screen. On the New Trigger screen search for and select the Scheduled trigger
Configure the Scheduled action to query for issues with a "blocked" status that haven't been updated for more than five days. This uses JQL to dynamically select a set of issues.
Step 2. Add component
Select Add component from the Rule details list on the left sidebar. Search for and select the Comment on issue component.
Use the Comment on issue screen to compose a comment message that the automation rule will automatically apply to transitioned issues. The comment acts as a template string and can interpolate data. The “How do I access issue data in my comment?” link provides examples of how to use the templating system.
Below the comment is configured to inject the reporter.displayName value. You can customize your comment to your liking. Click the Save button when completed.
Step 3. Add a Lookup issues action
Next, add New action and search for the Lookup issues action.
This action aggregates the queried issues into a list for batch actions. This is useful to avoid duplicate follow-up actions. Configure the Lookup issues action so it uses the same JQL query as the schedule trigger.
The following is another example of adding an action component to this rule. On the Add Action screen, search for and select the Send Slack message action.
Step 4. Add Slack message
To enable the Send Slack message action you will need the Webhook URL, which you can get from your Slack administrator. This allows you to specify the message, channel, or user to send the Slack message to. Once you configure the Send Slack message action, click the Save button.
The rule is fully configured now. When you check the Rule details on the left sidebar, it should look like the following:
If your rule details look similar, enter a name for the new rule and click the Turn It On button. Since this is a scheduled rule, you can manually trigger it. Click the Run rule button at the top right of the rule page to execute the rule.
Once you run the rule, visit the Audit Log to review the results and see if the rule executed successfully. If the rule encountered an error, the audit log will help debug the error.
If you would like to explore other examples of rules, head over to our rule template library.