This article is being used to demonstrate how to automatically add Watchers to Jira Issues when a User is mentioned in a comment, using Automation.
Please note that you can make this Rule either a Single Project, Multiple Project, Project Type, or a Global Automation Rule, depending on your preference. But bear in mind our: Best Practices for Optimizing Automation Rules
Configure your Automation Rule Trigger to run on the Comment Types that you prefer the @mentioned Users to be added as a Watcher on. I configured my Automation Rule Trigger to Trigger on All comments.
Then, Create a Variable Automation Action that will use any variable name, with the Smart Value field as:
{{issue.comments.last.body.split(" ").match("(accountid:.*)]").remove("accountid:")}}
This will look like the following in the Rule, right after the Rule Trigger:
After that, we will want to configure an Advanced Compare Condition. This will look at the First Value of the Variable Name that you created and evaluate if there are no watchers on the comment action. In my case that is {{addwatchers}}. That said, if there are no mentions in the comment, then the Rule does not run the Action. If it does, it will execute the Action in the Rule Next. Here is a screenshot of the Advanced Compare Condition:
Lastly, we will configure the Add Watchers Automation Action, using the {{addwatchers}} Smart Value:
This will all look like the following in the Automation Rule Flow:
I hope this helps!
-Christian B.
Christian Beaulieu
JSM Support Engineer 3
Atlassian
Phoenix, Arizona
2 accepted answers
Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.
Register today!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.
6 comments