Jira automation ping users with special characters in their account ID
Asked by Collin Roberts:

Hello,  

I am trying to create an automation where I need to ping a user that contains special characters in their accountid found in their profile.  

Would look something like this as an example at the end of the URL.  

/ViewProfile.jspa?name=c+roberts12345

I tried there examples, but neither seem to work. Any advice?  

\[\~c+roberts12345\]

\[\~"c+roberts12345"\]

(both just paste comment showing all text.)


Answers:
author: David Blank
body: Hi [@Collin Roberts](/t5/user/viewprofilepage/user-id/5326717) and welcome to the Atlassian Community!

Would you share screenshots of the smart value you are using for the User and how you are pinging them? (ex. Slack, Email, @-mention)

comments: author: David Blank
body: [@Collin Roberts](/t5/user/viewprofilepage/user-id/5326717) this is the smart value I use to tag the assignee of a given issue in the comments:  

\[\~accountid:{{issue.fields.Assignee.accountId}}\]


author: Collin Roberts
body: Hello, [@David Blank](/t5/user/viewprofilepage/user-id/4116552)   

Here is a screenshot of the example. I am trying to @-mention a list of users that are not mentioned within the issue in other fields such as assignee. ![Screenshot from 2023-09-26 14-10-49.png](https://community.atlassian.com/t5/image/serverpage/image-id/283063iF96BB24535225433/image-size/large?v=v2&px=999 "Screenshot from 2023-09-26 14-10-49.png")

Doing so results in the below.

![Screenshot from 2023-09-26 14-14-34.png](https://community.atlassian.com/t5/image/serverpage/image-id/283065i44866A8E6A8C851B/image-size/large?v=v2&px=999 "Screenshot from 2023-09-26 14-14-34.png")


author: Bill Sheboy
body: Hi [@Collin Roberts](/t5/user/viewprofilepage/user-id/5326717) -- Welcome to the Atlassian Community!

As David described, you will need the accountId value for each of those users.

As you note they are not associated to the issue in any way, such as an issue field, you will need to hard-code the values.

Kind regards,  
Bill


author: Collin Roberts
body: Hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)  

Could you advise where to find the proper accountId?  
When I go to the users profile, I see this instead of the long series of numbers other users see..  

"<https://atlassian.ccri.com/jira/secure/ViewProfile.jspa?name=>c+roberts12345"

Thanks!


author: Bill Sheboy
body: An easy way to find these is using an issue search and JQL...

* navigate to Filters \> View All Issues
* enter some JQL like this
  * assignee IN (*theUserName*
  * As soon as you start typing, Jira will suggest a user name for you to select
* Jira will autocomplete, replacing the user name with their account id value
* grab the account id(s) for use in the rule


author: Collin Roberts
body: This returns   

assignee IN ("c+roberts12345")  

However this still does not ping the user   

\[\~c+roberts12345\]

\[\~"c+roberts12345"\]


author: Bill Sheboy
body: Please note I did not type in quotation marks in that JQL...Instead when I typed the id autocomplete found the name, and then substituted the account id.

And...this was a method to find the account id values; they still must be used in your rule to effect the mentions.


author: Collin Roberts
body: Apologies. The return includes the quotation marks. However I mistypes. This is what is returned.  

assignee IN ("C Roberts12345")  

The "+" Found when going to the user profile is removed, but now there is the space (Which is why I believe there is quotation marks included)  

These examples do not work still when trying to ping.

\[\~c+roberts12345\]

\[\~"c+roberts12345"\]

\[\~c roberts12345\]

\[\~"c roberts12345"\]


author: Bill Sheboy
body: Let's confirm something...what version of Jira are you using: Cloud, Server, or Data/Center? And, do you have any marketplace addons for JQL installed?

Next, as Dave described originally, this is the format to mention someone in a rule comment, where you insert the specific user's account id value. That can come from a field or be typed-in, as in your case. You cannot mention someone with the user name in a rule.

```
[~accountid:insertTheUsersAccountIdHere]
```

When you use JQL to find the account id values, I have not seen the quotation marks automatically added. This is why I asked your Jira version and if you have addons installed, as something else appears to be adding them. Please try removing the quotation marks to see if the autocomplete replaces them with the account id value.

If this technique does not work, I suggest working with your Jira site admin to help identify the account id values you need.


Tags: atl-gruland