How to automatically add tagged user as a watcher

Kat Bruno March 29, 2024

I'm trying to find a way to add the user who is tagged in a comment as a watcher to the ticket. 


- I know if the user themselves comment on the ticket, they'll be added as a watcher.


But this case is, if someone else @mentions them.


Thank you in advance

2 answers

2 votes
Kalyan Sattaluri
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.
March 29, 2024

Hello @Kat Bruno 

Please see / reference the comment by @Bill Sheboy in this thread.. LINK

I am restating what he said in that thread, basically there is no OOTB solution.

You have to set up an automation rule.

To do so, If a user is tagged, then below smart value gives you the account ID's of the users who you can assign as a watcher.

 {{issue.comments.last.body.split(" ").match("(accountid:.*)]").remove("accountid:")}}

So your rule will look like,

Trigger = Issue commented

If condition -> smart value check -> if above value is not EMPTY (leave blank)

Then update issue with watchers = put the smart value.

Hope it helps.

0 votes
Kat Bruno March 29, 2024

Thank you for your reply. I found that thread shortly after posting.

However, I've found another/better solution to my scenario:

We have a rotating on-call schedule for teams (different projects). In order to easily change the assignee when the next individuals schedule come up I've decided to utilize the Component field.

Components have an owner. The owner of this component can be made the tickets assignee automatically if that particular component is selected. If no owner, our project setting is default to unassigned.

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events