Forums

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

How to make a replace account id with the user mentioned in a comment?

Raven Clarke
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 14, 2024

I am trying to set up a rule that sends an email whenever a comment is added to a ticket.  When a user is @ mentioned in the comment, the account id is included in the email notification.  I need to replace the account id with the actual user who is mentioned in the comment.

What I have so far (from other community posts) is how to detect if an account id is included in the comment.  I'm just looking for some type of expression that will convert the account id to the user's name who is mentioned. 

Screenshot 2024-06-14 152434.png

1 answer

0 votes
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.
June 14, 2024

Hi @Raven Clarke -- Welcome to the Atlassian Community!

When you only have the accountId value from a mention, the other user data is not available for use: displayName, emailAddress, etc.

A few possible workarounds are:

  • use the Send Web Request action to call the REST API to search for the user by their accountId, and the other attributes will be available in the response
  • add a user-select, custom field specifically for the purpose of converting id values to user data
    • action: set the custom field to the id value
    • action: re-fetch the issue to reload the data
    • action: now the data is available with {{issue.yourCustomField.displayName}}
  • if you only have a few users, use a Lookup Table to get the information

Kind regards,
Bill

Raven Clarke
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 17, 2024

Thank you @Bill Sheboy! I will try the Lookup Table solution and see where that gets me.

Raven

Suggest an answer

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

Atlassian Community Events