Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×The new 'Autowatch' feature in version 5.0.3 of JIRA is enabled for everyone by default. We've so far set up our projects and notifications in such a way that having the reporter auto-watch their created issues will be unacceptable. [1]
Is there a setting that can disable this feature site-wide?
[1] the reason is: we auto-create issues by email and set the reporter field, but our notifications do NOT email the reporter (we use JIRA behind-the-scenes). We use the watcher field to add people like Analysts, Devs, Ops people, etc, and so 'Watchers' is on most notifications. As far as our users know, they email "Help Desk" and further communication is via email with a real person (not a JIRA system). With reporters being auto-watched, we're hooped I think.
It's a bit of an oversight that they have not made this disable-able, imho. It's not even a plugin module so you can't disable it.
If you can't recompile a class, you may have to rethink.
darn, I was hoping it was a plugin. I don't currently have a staging env, so couldn't check. Thanks Jamie.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You might need to resort to SQL and update the database once you figure out what records are created/updated when a user disables autowatch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could easily run a few lines of groovy to change the autowatch preference for users, but the problem is when new users join. I guess you could write a UserEvent listener which turns it off whenever someone signs up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, I'm sure there's those out there that would find it 'easy', but I'm not among them. ;) (It's mostly the JIRA API I just don't "get")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have script runner, the following lines pasted into the script admin panel will disable autowatching for all users:
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.user.preferences.PreferenceKeys def userManager = ComponentAccessor.getUserManager() def preferencesManager = ComponentAccessor.getUserPreferencesManager() userManager.getUsers().each {user -> preferencesManager.getPreferences(user).setBoolean(PreferenceKeys.USER_AUTOWATCH_DISABLED, true) }
You can also (relatively) easily set this up as a service to run every 20 mins or whatever.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that Jamie,
As I think of it more, the auto-watch *would* actually be handy for us back-end folks. I think I'll create an autowatchers group, assign the back-end people to that group, and then alter your script to check for the group membership (and only adjust people not in autowatchers).
Aside from a plugin, I was also hoping that it might be implemented as one of those built-in post functions that happens during workflow, that i could just remove. But then realized comments aren't workflow-able.
I'll have to dust of staging and give it a try.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, it's implemented as a listener, but not the old style that you could just remove admin -> listeners.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Preparing for upgrading JIRA to 5.0.7 i find this as a pitfall. Thank you Jamie for the groovy script, it creates the propertyentities and entries, so no unwanted emails will be sent.
Of course I was looking for a sql command, the data tables are:
* external_entities
* propertyentry
You probably have to insert the records for users, and reindex JIRA. I don't recommend doing this.
I choose to run Jamie's script, although it returned errors, it created all the entries for the users. And I didn't have to reindex JIRA.
I have to change it or find another solution for new users until we figure out how to modify the notification schemes to fit in the situation and re-enable this feature (which is very good I think).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, and the value is stored in here:
* propertynumber
one note about the script: it is not working if no one changed the Autowatch property.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jamie,
is there a way to use your solution and only use it for one project (and the users in that project) not all users for all projects?
Thanks for reply!
/Per
--
If you have script runner, the following lines pasted into the script admin panel will disable autowatching for all users:
1
2
3
4
5
6
7
8
|
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.user.preferences.PreferenceKeys def userManager = ComponentAccessor.getUserManager() def preferencesManager = ComponentAccessor.getUserPreferencesManager() userManager.getUsers(). each {user -> preferencesManager.getPreferences(user).setBoolean(PreferenceKeys.USER_AUTOWATCH_DISABLED, true) } |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Autowatch is a user setting, not a project one. There's no relationship between projects and watching - you either have autowatch enabled on your account or you do not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nic, thanks for reply, yes I was in the wrong end to configure this, got it now.
If you have many users, how to work with this efficient? (if some want to still use autowatch and say 100 want to disable). Does every user have do disable it?
The solution Jamie gave will impact all users in all projects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Decide on the default setting for the majority of your users first, and set that.
Then, yes, ask the users to set their individual preference if they don't like the default. There's no tieing it to project membership.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had the very same problem and tried the direct DB-access route but with no success.
So I installed the Script Runner plugin and used the groovy script of Jamie (thanks for that, Jamie!). It works really well, but I recommend a small change to it: Add a check if autowatch isn't disabled already. This change makes it run almost twice as fast (slightly more than a minute compared to two minutes for my 42.000 users installation):
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.user.preferences.PreferenceKeys def userManager = ComponentAccessor.getUserManager() def preferencesManager = ComponentAccessor.getUserPreferencesManager() userManager.getUsers().each { user -> if (! preferencesManager.getPreferences(user).getBoolean(PreferenceKeys.USER_AUTOWATCH_DISABLED)) { preferencesManager.getPreferences(user).setBoolean(PreferenceKeys.USER_AUTOWATCH_DISABLED, true) } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can now configure autowatch for all users in JIRA 5.2.2. More details in the release notes:
https://confluence.atlassian.com/display/JIRA/JIRA+5.2.2+Release+Notes
Kind Regards,
Andrew
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can disable by wrtiting a service.here is the code-
private void deactivateAutoWatch() {
UserManager userManager = ComponentAccessor.getUserManager();
UserPreferencesManager preferencesManager = ComponentAccessor.getUserPreferencesManager();
Collection<User> allUsers = userManager.getUsers();
for (User user : allUsers) {
try {
preferencesManager.getPreferences(user).setBoolean(PreferenceKeys.USER_AUTOWATCH_DISABLED, true);
} catch (AtlassianCoreException e) {
log.error("AutoWatchDisableService Error:" + e);
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mike, here I found some documentation about how to disable the autowatch tool:
I believe there isn't a way to change it by default, you should go to every user profile and change the option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not gonna happen, I have over 300 profiles, to which I don't have the password. And I don't want them to change it back either. I need a way to disable autowatch entirely, or I'll have to rethink and redo our usage of reporter field, watcher field, and notification schemes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Auto watch can be configured in the JIRA UI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Anybody have a clue on where this can be updated via SQL?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @JamieA ,
Is there a way to set all users autowatch preference to "Inherit from global settings" using scriptrunner?
Thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie,
regarding your solution about autowatch disabled, is there anyway to use this solution on one project? (that this rule will not change for alla projects) ?
--
If you have script runner, the following lines pasted into the script admin panel will disable autowatching for all users:
1
2
3
4
5
6
7
8
|
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.user.preferences.PreferenceKeys def userManager = ComponentAccessor.getUserManager() def preferencesManager = ComponentAccessor.getUserPreferencesManager() userManager.getUsers(). each {user -> preferencesManager.getPreferences(user).setBoolean(PreferenceKeys.USER_AUTOWATCH_DISABLED, true) } --
Thanks for quick reply!
/Per Sundstedt
|
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In our case what we would need is to have autowatch enable or disabled per-project. In some cases we would like it happening but we do have some others projects that we want to handle as Mike Curwen says, in a "JIRA behind-the-scenes" mode.
To just enable or disable for the whole instance is a bit of a shotgun approach, in my view.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Really appreciate the code!!! I understand what it does. However, I do apologize as I'm just know .Net and have no idea how to write a service for Jira. Could you help me with some tips?
I found this on google: http://www.j-tricks.com/1/post/2010/11/jira-service.html But have no clue on how to setup Eclipse (I assume) and all the other stuff needed to create a service for Jira.
Any help will greatly be appreciated.
Thanks,
Carlos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately no. I'm only the user (administrator) of Jira for my office. Just upgraded from 5.0 to 5.0.6 and got into trouble by this autowatch feature. I'm sure it helps someone, but it sure sucks for my setup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
just set up the atlassian-sdk:
https://developer.atlassian.com/display/DOCS/Set+up+the+Atlassian+Plugin+SDK+and+Build+a+Project
then do any plugin tutorial, e.g. https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Creating+a+Custom+Field+in+JIRA
that should get you started. (you will then know, that you just have to go into the directory with the pom-file, execute atlas-mvn eclipse:eclipse and import the project into eclipse)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have found and voted for this issue: https://jira.atlassian.com/browse/JRA-28268
Please do the same, if you think this needs fixing!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.