I'm trying to integrate a conditional Slack notification in a specific channel. The goal is to have the notification mention each user listed in a multi-user field so they can get certain urgent notifications.
When I have the smart value in the notification, the automation fails with an error of "Error rendering smart-values when executing this rule." If remove this bit, the rule runs fine.
{{#}}@{{issue.approvers}}{{/}}
Any advice on what I need to modify here is greatly appreciated. Thank you!
When you want to iterate over a list of values in a rule, the syntax is like this:
{{#someList}}{{someFieldOfTheList}}{{/}}
For your case, are you trying to mention on the user's display names? If so, that would be like this:
{{#issue.approvers}}@{{displayName}}{{^last}}, {{/}}{{/}}
That last handling adds a delimiter of ", " between values (leaving off the final one), so please change that as needed.
To learn more about list, smart values, please look here: https://confluence.atlassian.com/automation/jira-smart-values-lists-993924868.html
Kind regards,
Bill
Hi @Bill Sheboy
Thank you so much! Now we're getting somewhere. If I want the username to display instead, what would go there?
The automation worked this time, however it didn't tag users on the Slack side (just the @FirstName LastName without a tag) so I think maybe we should try the username.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have to use the display name or the member ID that the user have in Slack for the @ mention to work. If all your users are using the default firstname.lastname as the display name then this should work for you:
{{#issue.approvers}}@{{displayName.replace(" ", ".").toLowerCase}}{{^last}}, {{/}}{{/}}
If some of your users have modified their display name in Slack then the only way you can @ mention them in automation is to use their member Id and the syntax for it would look like this:
<@memberId>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I'm trying to create a rule that will mention in Slack all the participants to a meeting that are tagged as so in the issue.
So currently what my rule does is that when someone creates an issue that is a Meeting it will send a message to Slack.
At the moment in the message what works fine is:
What doesn't work is mentionning all the participants. Using the following formula:
{{#issue.approvers}}@{{displayName.replace(" ", ".").toLowerCase}}{{^last}}, {{/}}{{/}}
I made some progress and 9 names across 27 are correctly mentionned when tagging them as participants. The others are not mentionned. I tried to use <@memberId> but i didn't understood where did i had to integrate this part ot the whole above.
Do you have any idea on how i could fix this?
Thanks a lot for the help and have a great day!
Hippolyte Simon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Hippolyte Simon,
Welcome to Atlassian Community!
Slack no longer support @username so you have to use their member Id. Have a look at this article that describes how you can add users Slack member Id as properties on their accounts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi thanks for your quick answer!
A friend of mine and I found the solution, since i use this method to link Jira and Slack: https://community.atlassian.com/t5/Automation-articles/Mention-someone-directly-in-Slack-via-Jira-Automation/ba-p/1528605
Here's the formula:
{{#issue.participants}}<@{{properties.metadata.slack_id}}>{{^last}}, {{/}}{{/}}
Thanks and have a great day!
Hippolyte Simon
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.