How do I create an automatic rule in Jira so that whenever a task becomes blocked, a message is sent to my team in Slack?
To create an automatic rule in Jira that sends a message to your team in Slack whenever a task becomes blocked, you can use Jira Automation combined with a Slack integration.
Steps to Create the Rule:
1. Set Up Jira-Slack Integration:
- Go to your Slack workspace and add the Jira app if it's not already added.
- Follow the instructions provided by the Jira app to connect it to your Jira instance. This usually involves adding the app to your Slack and authorising it to connect with Jira.
2. Create an Automation Rule in Jira:
- Go to Project Settings > Automation (or System Settings if you're setting a global rule).
- Click Create Rule.
3. Set the Trigger:
- Choose Issue Updated as the trigger.
- Add a condition to check if the status is changed to "Blocked." You can do this by adding New Condition with a Field Value Changed condition or a JQL condition like `status = Blocked`.
4. Add an Action:
- Choose Send Slack message from the available actions.
- Configure the Slack action:
- Select the Slack channel where you want to send the message.
- Customise the message content. You might want to include dynamic content such as the issue key, summary, and a link to the issue. For example:
``` Issue {{issue.key}} - {{issue.fields.summary}} is now blocked!
Check it out: {{issue.url}}```
5. Test the Rule:
- Before finalising, test the rule to ensure it works as expected. You can do this by manually changing an issue's status to "Blocked" and checking your Slack channel for the message.
6. Save and Enable the Rule:
- Once you're satisfied with the setup and testing, save the rule and make sure it is enabled.
Hi @Harpreet
Here are some suggested improvements to the rule you posted.
First, there are known racetrack timing defects with rule triggers and thus I recommend not using the feature to add conditions directly to triggers until that is fixed. Instead, add separate conditions. Atlassian knows about this defect and is working on architectural changes to fix it, with no timeframe announced.
Next, the rule uses the Work Item Updated trigger, which means the rule will send the message every time the work item is updated and still flagged. This is not what was requested.
And, there is no such thing as a "Field Value Changed" condition.
Putting those together, one wonders if this post was bot / AI-generated rather than from an actual rule and documentation. As a reminder, when posting such content the source should be disclosed and the content tested. To learn more, please carefully review the community guidelines:
https://community.atlassian.com/forums/custom/page/page-id/rules-of-engagement
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The rule suggested by @Harpreet has some challenges which may cause it to not work as you asked. An alternative rule would be this...after first configuring your Slack integration with Jira:
Kind regards,
Bill
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.