Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,367,620
Community Members
 
Community Events
168
Community Groups

Automation Help: Add watcher when user mentioned in comments

Hi Jira Community,

 

Looking for some help using the native automation tools in Jira Cloud to create automation where if a user is mentioned/tagged in the comments section, they'll be added as a watcher for future issue updates. My thought process here is that if a user is tagged, it's likely they are then impacted or associated with the issue and may want updates on that particular issue. Do I need to add a specific JQL condition after "Comment is the main action" rule trigger? Any help would be greatly appreciated! 

2 answers

0 votes

Hi @Mateus Almeida -- Welcome to the Atlassian Community!

Until such a feature is built into Jira Cloud, what you can try is creating an automation rule, triggered on Issue Commented, extract the mentioned users' accountId values, and then add them as watchers.  To do this, you will need...

  • to use a regular expression to get the accountId values, for example...
    • {{issue.comments.last.body.match("(accountid:.*)]").remove("accountid:")}}
  • a condition test to check for empty values
  • an advanced branch to iterate over the values, and
  • an action to add the watchers.

Kind regards,
Bill

0 votes

@Mateus Almeida - are you using server or cloud? If you are using server, this feature has been enabled where @mentions on comments make the mentioned user a watcher. In cloud, there is a suggestion open in the Jira Cloud project that is in the "Reviewing" status. See here: https://jira.atlassian.com/browse/JRACLOUD-31869. I voted for this feature for you.

At this point in cloud, @mentions are used to just reach out to someone once. Here is some more information: https://www.atlassian.com/blog/jira-software/using-watchers-and-mentions-effectively 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events