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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automation: How to @mention user in Add Comment action?

Hi!

I'm currently using the cloud version of Jira Service Desk and was trying to set up an automation rule for when status changed (this is the trigger). When a request is transitioned to a specific status (e.g., Awaiting Implementation), I want to Add Comment and @mention specific users so they're aware that this request is ready for them. However, it keeps telling me no users found.

I've already made sure that the rule's running user has the Browse users and groups permission. The interesting thing is that @mention works in the Alert User action (this could be a solution, but it's not ideal because I can't customize the alert message).

Does anyone know if I'm doing something wrong or didn't set something correctly? Or is this a known issue with Add Comment? If so, what's the workaround, besides getting a plugin (it just seems silly to me that I have to purchase a plugin to perform such basic/native functionality)?

9 answers

1 accepted

3 votes
Answer accepted

Hello,

 

Just an accidental find while messing around that actually works. 

 

Step 1: Find the internal username

Go to any workflow and edit it. Go to create transition and add a Post Function.

At the Post Function page, pick Update Issue Field.

Choose Issue Field Assignee and pick the third option (start typing...)

Start typing the desired user. Find him/her and click.

What is written in the field after the click is some kind of internal username.

If there is an easier way to find out this username, please, let me know.

 

Step 2: Add the internal username to the comment exactly as [~internal-username]

 

Step 3: Click preview...

I would like to say that as of Jira 8.5.3. This no longer appears to work.  It used to work but we just got alerted that the users being tagged are no longer receiving emails from our postfuntion doing this

This works for me:

[~accountid:{{comment.author.accountId}}]

Thanks! It definitely works!

This did not work for me - it simply resolves to "User" or "Former User" depending on the browser - I cannot get this to work correctly. I'm trying to @ a watcher or another user, but nothing works. Not even the assignee.

Like Abir Stolov likes this

Me too, it links to UNKOWN_USER

me too.. links to UNKNOWN_USER

Be sure that you are asking the smart value for the correct context. In my case I needed the issue assignee for the card and not the comment author. Below are a few examples:

[~accountid:{{comment.author.accountId}}]
[~accountid:{{issue.assignee.accountId}}] 
[~accountid:{{issue.reporter.accountId}}] 

If you are wanting to use a static @ for a user that is not within context of the issue/comment you can do so by looking and passing their user hash. To do this simply click on the name of the user in any issue or comment to go to their profile.

You will see a url similar to: https://company.jira.com/people/687614:8ffcb0ed-ddbd-4688-8635-c76146f483. Given this link example your @ would look like:

[~accountId:687614:8ffcb0ed-ddbd-4688-8635-c76146f483]

Like # people like this

@Christos Zachos Thanks for your comment, I have just tested this and your suggestion works!

When setting up the automated comment, I just needed to add [~olivia.morris] in the comment section. (the @ mention function doesn't work, it "can't find the user")

This means I can now skim through email notifications and see the update on them, without needing to click into every ticket to see why I have been notified. 

 

1. EDITING THE AUTOMATED COMMENT

Screenshot 2019-05-24 at 11.52.32 am.png

2. PREVIEWING THE AUTOMATED TICKET

Jira automated comment mentioning user solution 1.png

3. AUTOMATED EMAIL NOTIFICATION, WITH COMMENT (EXAMPLE)

Jira automated comment mentioning user solution 2.png

 

Thanks!

Be sure that you are asking the smart value for the correct context. In my case I needed the issue assignee for the card and not the comment author. Below are a few examples:

[~accountid:{{comment.author.accountId}}]
[~accountid:{{issue.assignee.accountId}}] 
[~accountid:{{issue.reporter.accountId}}] 

If you are wanting to use a static @ for a user that is not within context of the issue/comment you can do so by looking and passing their user hash. To do this simply click on the name of the user in any issue or comment to go to their profile.

You will see a url similar to: https://company.jira.com/people/687614:8ffcb0ed-ddbd-4688-8635-c76146f483. Given this link example your @ would look like:

[~accountId:687614:8ffcb0ed-ddbd-4688-8635-c76146f483]

1 vote
Jack Community Leader Jan 17, 2019

@wa1_kh00, to be clear are you saying the users you are trying to mention are either agents for the project or they are say Jira SW licensed users that are in a group that has Browse and Add Comments permission? Assuming this is the case then they should show when you click Comment and @mention them. I would ask one of the users to verify that they can view and comment on an issue.

@Jack In this case, they're agents (they're also Jira SW licensed users as well).

Well, if I were to manually comment on a request, I can @mention them. But not so in automation rules, specifically the Add Comment action.

Like Mark Hostetler likes this
Jack Community Leader Jan 17, 2019

ah, my bad. was not thinking about automation. I have never attempted that but expect it is not possible. maybe others have different thoughts here.

No worries! It's helpful to cross-check.

It would suck if it's not possible...love to hear what others have to say.

@[~accountid:{{worklog.updateAuthor.accountID}}] is how I solved it for Cloud when trying to mention the last person to log time on an issue.

Screenshot 2019-05-15 at 3.08.38 pm.pngI also experience the exact same thing! 

 

I want to be able to post an internal comment, @'ing myself, when certain triggers occur, so that I get an email saying "@olivia, the SLA is about to breach" etc however i can't seem to be able to @ mention myself in the automated comment function. 

 

You can "alert" a user, but that just sends me an email saying "This ticket requires your attention", with no context to why. 

i 've tried this , but no works,  still the field by default assigned to  

autoassign.jpg

@Tasneem Abdelhamid Are you trying to update the field assigned or mention them? Your screen shot is assigning a field, but this question is addressing users for messaging within text fields.

For Jira Software Cloud, I tried this- [{{ currentUser | userInfo("displayName") }}|~accountid:{{ currentUser._accountId }}] 

This allowed me to successfully run a post function that mentions the current user of the issue.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Asked in Jira Service Desk

Calling all Insight users, we need your help!

Hello Insight users,  As part of our (Mindville's) acquisition by Atlassian, our training team is looking to build some new Insight training materials. It would really helpful if you can ...

266 views 4 6
View question

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you