Solution
To create a Jira automation that sends a Slack message to 5 specific people and user-chosen channels without duplicates, follow these steps:
-
Create Custom Fields:
- Add a text field named "Slack Message" for the message content.
- Add a text field named "Slack Channels" for additional channels (comma-separated).
- Add a checkbox field named "Slack Message Sent" to track if the message has been sent.
-
Set Up the Automation Rule:
- Trigger: Set the trigger to when an issue is transitioned to a specific status (e.g., "Ready for Review").
- Condition: Add a condition to check if the "Slack Message Sent" field is not checked.
- Action:
- Send a Slack message with the content from the "Slack Message" field.
- Include the 5 specific people by their Slack mentions (e.g.,
@user1 @user2 @user3 @user4 @user5).
- Include the channels from the "Slack Channels" field.
- Additional Action: Check the "Slack Message Sent" field to true to prevent duplicates.
-
Example Slack Message Format:
[Content from "Slack Message" field]
Recipients:
@user1 @user2 @user3 @user4 @user5 #channel1 #channel2
-
Verification:
- Transition an issue to the specified status.
- Fill in the "Slack Message" and "Slack Channels" fields.
- Verify that the message is sent to the correct users and channels without duplicates.
By following these steps, you ensure that the 5 specific people always receive the message without duplicates, and additional channels can be dynamically included based on user input.
### Steps to Implement the Jira Automation:
1. **Create Custom Fields**:
- "Slack Message" (text field for message content).
- "Slack Channels" (text field for additional channels).
- "Slack Message Sent" (checkbox to track message sending).
2. **Set Up the Automation Rule**:
- Trigger: Issue transitioned to "Ready for Review".
- Condition: "Slack Message Sent" is not checked.
- Action: Send Slack message to the 5 people and channels from the custom fields.
- Additional Action: Check "Slack Message Sent" to true.
3. **Example Slack Message Format**:
```plaintext
[User input message here]
Recipients:
@user1 @user2 @user3 @user4 @user5 #channel1 #channel2
- Verification:
- Transition an issue and fill in the custom fields.
- Check Slack to ensure the message is sent correctly without duplicates.