Is there a way to decode or remove user mention in the body of a comment when using smart values?
I am sending an email when an issue meets a certain criteria and would like to include comments but the user mentions displayed are ugly. I would like to remove or decode the accountID to user name.
Example
[~accountid:557058:3242d09a-2bc3-45d8-9e23-c4f297841a63]
TL/DR
I am a little sketchy on the specific implementation...
Yes @Chris Byrne
I've sucessfully achieve this by adding .text at the end
Example : {{issue.comments.last.body.text}}
At least it solve the problem for an integration with Slack.. didn't test it for an email....
Hi @Chris Byrne
Removing them is easy, if you do not mind any gaps in your comments. Please try the replaceAll() function with a regular expression to remove everything surrounded by the brackets.
{{#issue.comments}}
{{body.replaceAll("(\[.*\])", "")}}{{/}}
If you want a placeholder, you may replace the empty "" with something else, like "USER-MENTION". Please see this documentation for more about that function:
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Chris - I found there's no straightforward way to achieve your requirement.
Consider voting for the feature request tracked at JRACLOUD-77167.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.