Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Mention user in a comment if they weren't mentioned

Alexandra Dima June 3, 2023

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

1 answer

0 votes
Ash Yadav
Community Champion
June 3, 2023

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 

Alexandra Dima June 5, 2023

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

Screenshot 2023-06-05 at 10.39.25.png

Ash Yadav
Community Champion
June 6, 2023

Hi @Alexandra Dima 

 

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 

Alexandra Dima June 7, 2023

@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:

Screenshot 2023-06-07 at 12.42.22.png

 

Audit log:

Screenshot 2023-06-07 at 12.42.51.png

 

Edited comment:

Screenshot 2023-06-07 at 12.43.09.png

Ash Yadav
Community Champion
June 7, 2023

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. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events