Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Project Automation - Slack notification: how to tag users listed in custom field

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!

1 answer

1 accepted

3 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 20, 2023 • edited

Hi @Ashley Honeycutt 

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.

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 20, 2023

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>

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events