Ho to create an automation rule that if comment body does not contain tag (@) don't clone the commen

Orkhan Hasanov
Contributor
October 24, 2024

 

There is an automation rule that clones a task created in a Jira Service Management project to a project in Jira Software. Also, there is a rule that clones comments and it works. I want the comment not to be cloned if someone is tagged (@) and cloned if not. How can I write this? The rule that I wrote and works is attached. Here we just need to add one condition. Comment.body does not contain etc. It doesn't work as I checked. Even if there is a tag, it clones the comment.The Automation.png

1 answer

1 accepted

1 vote
Answer accepted
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 24, 2024

HI @Orkhan Hasanov 

You can look at this article, as there is no simple action/condition baed on mentioned user in a comment.

automation-identify-users-mentioned-in-comment-and-add-them-to-custom-field 

What is actually stored in the comment when a user is mentioned is their account ID, not their name.

The UI automatically converts that to display the name when you are viewing the issue, but in an Automation Rule if you used the Log action to print the comment body to the execution log you would see something like this for each mention:

[~accountid:62eaee831234509f4fdebf71]

Screenshot 2023-11-09 at 11.25.59 AM.png

If you want to check if any one or more of multiple users are mentioned in the comment then you would need to use the IF/ELSE block condition and add a condition for each user.

Make sure that you set the IF block to At least one condition matches.

Orkhan Hasanov
Contributor
October 24, 2024

Hi @Marc - Devoteam Thanks.

Like Marc - Devoteam likes this
Orkhan Hasanov
Contributor
October 24, 2024

I edited it and tested it. It works. Thank you again.

 

 

The Automation Edited.png

Like Marc - Devoteam likes this

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