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?
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.
This is a known issue for Cloud.
Here is the announced changes to usernames in Cloud:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.