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)?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
see this ticket
it appears to be a bug that will be fixed in release 8.9.1
Tom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The best way I have found is to go to a user's profile page, get their ID, and reference them in the action like this:
[~accountid:ACCOUNT-ID-HERE] do a thing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
[~accountid:ACCOUNT-ID-HERE] do a thing
works as of April 2023. Thanks Jon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no such thing as username in jira, perhaps full name or email?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works for me:
[~accountid:{{comment.author.accountId}}]
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.
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.
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.
me too.. links to UNKNOWN_USER
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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]
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.
Many thanks Aaron.
However I have two rules and are triggering at the same time on the same ticket, yet they have different conditions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think the .accountId is necessary. In my tests, both tag users successfully:
[~accountid:{{reporter.accountId}}]
[~accountid:{{assignee}}]
Before finding this thread I was trying just @{{assignee}} which ended up looking like @60dd74cbad9bba006a9c1a8b in the comment (which after checking is the account ID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello everybody,
in case anyone is wondering and stuck the same as i was. The solution for JIRA SERVER which works for Jira Project automation is using this:
E.g.
[~{{reporter.name}}]
[~{{assignee.name}}]
Clickable link to user profile/mention is placed in the comment :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you! That's it - worked for Jira Datacenter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Omg, thank you! Was going crazy since the other solution did not work!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Perfect! This worked for me, whereas [~accountid:{{reporter.accountId}}] did not!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wow! Thanks! This works for me too!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you so much :) !
The other solutions didn't work for Jira Data Center.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This-
[~accountid:{{issue.reporter.accountId}}]
Was exactly what I needed, thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This markdown format with hardcoded numerical account ID ([~accountId:687614...]) also appears to work in replies to Jira notification emails.
The reply body becomes a Comment on the Jira issue, and the markdown account ID is correctly rendered as an @ mention (as though you had commented on the issue directly). The @ mention will notify the user as expected (per their notification settings).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This-
[~accountid:{{issue.reporter.accountId}}]
Was exactly what I needed too!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm using Jira Cloud and I would be able to tag creator and reporter with these two:
[~accountid:{{issue.reporter.accountId}}] -> Works for tagging Reporter
[~accountid:{{issue.creator.accountId}}] -> Works for tagging Creator
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@[~accountid:{{worklog.updateAuthor.accountID}}] is how I solved it for Cloud when trying to mention the last person to log time on an issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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
2. PREVIEWING THE AUTOMATED TICKET
3. AUTOMATED EMAIL NOTIFICATION, WITH COMMENT (EXAMPLE)
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jack Brickey 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
what if neither assignee or reporter that we want to mention?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For Jira DC you can static comment/tag a user in the comments with [~username]
*replacing username with their Jira username
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello , you just need this logic in the comment, you need to call the email of the user.
(For DATACENTER)
[~{{user.emailAddress}}]
If you want to mention for instance automatically the reporter:
[~{{reporter.emailAddress}}]
Or the assignee maybe:
[~{{assignee.emailAddress}}]
And so on....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
i 've tried this , but no works, still the field by default assigned to
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I 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.
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.