Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Tagging users with colons in user ID in Jira Automation?

Marcella Wigg August 23, 2023

Hello!

I am currently using Jira Automation to tag users in comments of software tickets. I am using the `[~accountid:{user ID}]` approach.

This works for almost every user in my company's Jira subscription, but there are a couple users with colons in their user ID whom this doesn't work for.

Has anyone figured out a solution for this minor irritant? Hoping it's something very simple I haven't thought of.

1 answer

1 accepted

1 vote
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.
August 25, 2023

Hi @Marcella Wigg -- Welcome to the Atlassian Community!

Would you please post images of your complete rule and of the audit log details showing the rule execution for a case when the user was not mentioned correctly?  Thanks!

Until we see that information...

What is the source of the accountId values you are using in mentions?  For example, are you hard-coding them in the rule, are they from an issue field, something else?

Kind regards,
Bill

Marcella Wigg August 25, 2023

Thanks for your response, Bill. 

Yes, specific Jira users are being tagged in a hard-coded fashion. Unfortunately I cannot to share screenshots of my implementation, but as I said, I am tagging them by having `[~accountid:{user ID}]` in the comment that is created. 

This works for all users except those with colons in their user ID. So if in my Jira Automation I replaced {user ID} above with my user ID, since my user ID doesn't have a colon, in the resulting comment @Marcella Wigg shows up correctly. Whereas if Person X has a colon in their username, the attempt will show up as @User in the resulting comment instead of @Person X, essentially showing the user ID was unrecognized. The colon character in their user ID means the entire ID cannot be parsed correctly. 

TL;DR I'm wondering how to escape colons in user ID when tagging a user in a comment via Jira Automation. It is purely a colon-escaping issue and that's all. How the heck do I do that?  I've experimented some with potential obvious fixes without success. I'm probably missing something. 

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.
August 26, 2023

As you are using Jira Cloud, you may either type in the account id value directly or use created variables to address this.  I tested and both work with account id values containing colon characters; there was no need for escaping the characters.

  • create a variable with the id of the user to mention
    • name: varUserAccountId
    • value: enter the value needed
  • use that variable in the comment mention
Hello to [~accountid:{{varUserAccountId}}]

 

If this does not help, I would need to see your comment action details to know more.

Like Marcella Wigg likes this
Marcella Wigg September 5, 2023

Finally getting back to this.

 

For others dealing with the same problem, creating the variable WORKED! Thank you, thank you!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events