Hi,
in the scenario, im sending out an email via automation that contains the last comment on the issue. the comment may include a user mention.
when the email is sent, instead of the display name of the user mention, it sends their ID.
i cant use a smart value, since i cant expect when the comment will/not contain a user.
any advice?
Hi Ben,
Try adding .displayName after the field name.
For example {{issue.Reporter.displayName}}
Hello, I have exactly the same problem as Ben. Here is a screenshot of my rule:
When the issue comment contains a user mention, the email shows the user account ID, rather than the user name. Is there a workaround for this?
Belén
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the email that get sent. See the red account ID instead off the user mention:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So it looks like it is including the name as it should. But it just also includes the account id of the user. Is that the only problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This appears to be the expected behavior; there is a suggestion to improve this, which you may vote for/watch to see progress: https://jira.atlassian.com/browse/JRACLOUD-77167
A possible work-around would be to extract/replace mentioned accountId values for displayNames using a call to the REST API...although that might only help with a single mention.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello John Funk,
Nope, the user mentioned is replaced by the account ID, so one cannot see who the mentioned user was. In my screenshot, the blurred out name is the last comment author, not the user mention.
Hello Bill Sheboy.
Thank you for the reference to https://jira.atlassian.com/browse/JRACLOUD-77167, I will check and vote for this enhancement.
Regards.
Belén
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In case anyone else is looking for this, you can use the .html suffix as a work around (many thanks to @Diego Leitao on AUTO-450 for mentioning this):
{{issue.comments.last.body.html}}
Or, if you wanna get fancy with it
{{# issue.comments }}
{{# if(not(internal)) }}
{{#last}}
By: {{author.displayName}}
On: {{created.longDate}}
Comment: {{body.html}}
{{/}}
{{/}}
{{/}}
Works for rendering tables in comments properly too!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ben
Please consider posting an image of your rule as that my give the community more context to offer ideas. Thanks!
And, you may want to investigate using the text functions to find those mentions in the comment and then replace (or add) the user display name before sending the email.
Kind regards,
Bill
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.