Hi,
I've created an automation to copy comments from the original issue to a cloned issue. The problem is that any mention triggers a notification to the users mentioned. I would like to know how to convert any mention in the comment to text, so that the notifications are not triggered.
Many thanks
If you are willing to try a third-party app you could try our app Deep Clone for Jira. Deep Clone can clone issues including their comments, and there is an option to suppress notifications for mentioned users.
It would be easy to "break" the mention syntax (using the replaceAll function) so adding a comment no longer mentions someone, but it seems you want to replace the mentions with the display name of the users.
To learn if this is possible, we would need to see your rule and observe how you are copying the comments. For example...
The scenario that might work in a rule is when there is a branch over comments and zero-or-one user is mentioned. That could use a REST API function call to find the display name of the user for replacement. As that will potentially be a very slow rule, you may not want to do this as it could exceed your automation service limits for rule run time execution.
Another option would be to write an external service which performs all the replacements and adds the comments, in the correct order, and then call that service from the rule with a Send Web Request action. At that point, it may be better to use a marketplace addon for cloning.
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.
This one is a bit tricky. You can extract the user id from the @mention by using this smart value:
{{comment.body.match("\[~accountid:(.*?)\]")}}
The challenge comes in converting that. Smart Values can only work against a user field (e.g. reporter, assignee, custom field) so in order to take the next step of getting the display name, you have a couple options:
{{comment.body.replaceALL("\[~accountid:(.*?)\]",issue.YOURCUSTOMFIELD.displayName)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fernanda,
Since it is cloning all of the items, I don't think there is a way to control that in the middle of the cloning process for a single field. The only think might be to edit the comment before you clone the issue. Maybe leave the name but put in a space between the @ and the name. Something like: Hey @ johnfunk - this is good to go.
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.