Hello, I want to create an automation so that when a comment is added, it checks if a user is mentioned in that comment and if not, it edits that comment and adds the mentioned user.
I managed to get the rule to edit the comment, but I can't find a way to check for the user mention correctly
Hi @Alexandra Dima welcome to the Atlassian Community!
Can you please elaborate on what the business requirement is here?
Is this specific to a project, or any comments in any project?
Can you provide a screenshot of the automation rule that you have so far?
Kind Regards,
Ash
Hi @Ash Yadav , thank you!
Here is a screenshot of the rule I have so far; I would like to enable it on a project
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for posting this.
What happens when you enable this rule, does it fire?
Do you want this rule to be applied to all comment operations?
Do you have an audit log by any chance to show what the outcome is of the rule firing?
Kind Regards,
Ash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ash Yadav , when I run this rule, it edits the comment by adding the user mention, if I hadn't added it.
But if I add the user mention in the trigger comment, the automation adds the mention a second time, doubling it.
That is why I don't think the rule understand to check correctly for the user mention; it just adds it on all comments - and I don't want that
Here are some screenshots of what I see:
The rule:
Audit log:
Edited comment:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interesting, what if you added "cc" to your checks as well to see if it picks up on that?
Just as a test at least to see if it's actually going through the if condition before editing the comment.
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.