Hi!
I want to send a reminder over Slack for assignees to add the missing Original Time Estimate to their tickets.
I currently found a temp solution which lets me send one Slack message to a public channel, tagging all the relevant assignees in that one message (so avoiding multiple messages to the same channel).
My questions -
The solution I currently have: message a public Slack, tagging assignees in one message.
It requires making 3 different automation rules.
Rule 1
Step 1: Scheduled every 2 weeks
Step 2: Create a new issue with the summary:
{{now.jiraDate}} slack message
Rule 2
Step 1: Scheduled every 2 weeks (later in the day than Rule 1) with a JQL searching for the issue created in Rule 1
summary~"{{now.jiraDate}} slack message"
Step 2: Lookup issues
originalestimate=EMPTY AND assignee!=EMPTY
Step 3: Advanced branching using the smart value to find the email addresses of the assignees and removing dupes:
{{lookupIssues.assignee.emailAddress.distinct}}
Step 4 (part of the advanced branch): create a lookup table with everyone's emails corresponding with their Slack IDs (which our Slack admins kindly provided. I exported the rule after creating the lookup table > copy-pasted the table from excel to the json file where the temp lookup table was > and imported the rule back to Jira)
Step 5 (part of the advanced branch): add a comment to the issue (the one created in Rule 1, and searched for in Rule 2) with the values from the lookup table corresponding to the assignees' emails. Break down of that part of the branch:
The lookup table was {{num}}
The variable for the branch's smart value: {{email}}
Getting the Slack ID for each email: {{num.get(email)}}
Note that it didn't need the {{ or }} before and after the "email" -- the log shows the expected values.
Adding the formatting so that in a Slack message it will turn to tagging the user: <@{{num.get(email)}}>
The end result is that the issue will have as many comments as users and they are all <@SLACK-USER-ID> (example: <@AJHFJJD123>)
Rule 3
Step 1: Scheduled every 2 weeks (later in the day than Rule 2) with a JQL searching for the issue created in Rule 1
summary~"{{now.jiraDate}} slack message"
Step 2: Get all the comments body and remove any extra "<@>" (I don't know why but some comments only had that. Maybe the assignee isn't in my lookup table) or ","
{{issue.comment.body. remove("<@>").remove(",")}} Which results in a list of Slack IDs
Step 3: Message Slack and include in the body of the message: {{issue.comment.body. remove("<@>").remove(",")}}
(ignore the multiple "refetch data" that's nervous me)
In order to send a DM to the assignee you need to use their Slack member Id, and you can do that if you use user properties and sync it with Slack. Have a look at this article that describe what you need to do.
If you want to @ mention someone in a channel you can do that by adding @firstname.lastname but that only works if the user hasn't changed their display name in Slack. If they have, then you have to use their member Id like this <@xxxxxx>
Thank you! And yep I have been trying to use their member ID. I don't have it setup like the article but I'm using a lookup table of user names and their member ID. If I got it right, the pros of setting it up like in the article you linked is that I don't have to worry about updating my list?
The issue I'm running into is using smart values in the @ field. The smart value returns the member ID but still no DM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.