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

Translate user IDs in comments within Jira Automation messaging

Mark Wheeler
Contributor
August 20, 2020

Is it possible to translate User IDs referred to in Comments when displaying a comment as part of a Jira Automation action?

 

I send an email as part of a Jira Automation and include the below:

Latest comment:
{{issue.comments.last.body}}

 

But this produces something like the below:

[~accountid:5c9a182a03b8be71089b443f] I've checked with [~accountid:5d7b887d656e2a0dbab30627] and he recommended this action

cc [~accountid:5be4242c8298307a1e93bf00] [~accountid:5a952edb74e8e143a0ac6e88]

 

I'd like to translate the IDs into the user display names. Any idea as to how to do this if this is possible?

2 answers

2 votes
Yvan Martin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 27, 2020

Hi there Mark,

Developer from Automation here,

There are some limitations in what we display from that comment, it's basically what the API gives us. Although usually it does give the displayName, if you specify the body text/html in that smart value. Also since you are sending an email than it's also worth including the html tag to preserve links from the comment wiki markup.

Try either {{issue.comments.last.body.html}} for that html generated output, or {{issue.comments.last.body.text}}

I hope this helps.

0 votes
Kirkie
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 20, 2020

@Mark Wheeler 

This is a known issue for Cloud.

Here is the announced changes to usernames in Cloud:

https://confluence.atlassian.com/jirasoftwarecloud/gdpr-changes-to-usernames-in-jira-cloud-967319102.html

Followed by the impact of this to how smart values work in Automation:

https://support.atlassian.com/jira-software-cloud/docs/convert-usernames-to-user-account-i-ds/

While you can see there are ways to convert the id to display name, they do not provide a way to parse through the comment and convert portions of the string.

I would submit a Bug or Support ticket with Atlassian to see if there is a workaround or if they can hopefully add this functionality because I am sure it will be useful for users moving forward.

Mark Wheeler
Contributor
August 20, 2020

I was aware of the data protection reason for the IDs, but is annoying.

Thanks for the suggestion and I'll raise a ticket with Atlassian.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events