Default Watcher

JIRA Team Mailbox March 1, 2016

Can we make a particular user as default watcher when creating a issue. i saw some workarounds for this

  1. Add project role/group for notification scheme
  2. Add Distributed list for project lead

Anyway these workarounds only sends the notifications, but will not update the watcher field with the user, Is there any possibility of doing that ?

2 answers

1 accepted

4 votes
Answer accepted
Mohamad Khalife
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 1, 2016
JIRA applications don't have this feature natively, but you can do it as below:
  1. Install the JIRA Watcher Field Plugin

  2. Under Administration > Issues > Fields > Custom Fields, create a new field:
    1. Type = Watcher Field, Name = Watchers, Description = (eg) "Watchers are notified on issue changes", Search template = Watcher Search, Issue Type = Any, Context =Global
  3. Click the screens link for the new field and add it to the appropriate screen associated with issue creation.
  4. In the Administration > Issues > Screens section, you can set the position of the watchers field for screens you have added it to.
  5. Perform a re-index.
JIRA Team Mailbox March 1, 2016

We don't  want to select the user we have a specific user, can we set this automatically when we create an issue

Mohamad Khalife
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 1, 2016

You need the script runner plugin:

Add the following groovy script:

 

import com.atlassian.jira.ComponentManager
 
def componentManager = ComponentManager.getInstance()
def watcherManager = componentManager.getWatcherManager()
def userManager = componentManager.getUserUtil()
 
def watchUsers = {usernames ->
   usernames.each {
         def user = userManager.getUser(it)
         watcherManager.startWatching(user, issue.getGenericValue())
      }
}
 
   def users = ["comma", "separated", "usernames"]
      watchUsers(users)
Vijay Sridhar August 27, 2017

Hi ,

Thanks for the script.

i am getting error on the line 5 for this

->   any thing to be replaced for this ?

0 votes
Ravi Shah March 25, 2020

Hi @JIRA Team Mailb ,

You can achieve this by means of automation rules.

I was able to add a default watcher by simply creating an automation rule at the event (trigger) of New Issue Created, followed by certain conditions which are called components in automation rule config. No Plugins are required to do so and we can choose this rules at global level or at project level as well. BTW the rules are very cool to do lot of stuff automatically. 

HTH :)

Guy Amrany June 4, 2020

Hi!

How do I do that?
How do I access these automations from Issue created?

I want to setup a default Reviewer rule to be the person who is the Reporter of the issue

Thanks ahead

Ravi Shah September 15, 2020

Hi,

 

You should have Admin rights for the project to have access to "Automation Rules", alternatively you can ask project admin to do that for you. W.r.t. specifically about Default Reviewer, I haven't tried that, but if there is a field for that, it should be possible. Refer page : https://www.atlassian.com/software/jira/guides/expand-jira/automation, for better understanding. 

Suggest an answer

Log in or Sign up to answer