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,369,559
Community Members
 
Community Events
168
Community Groups

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
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.

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

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)

Hi ,

Thanks for the script.

i am getting error on the line 5 for this

->   any thing to be replaced for this ?

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 :)

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

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
TAGS

Atlassian Community Events