In JIRA 7.8, I use ScriptRunner to create a post function trigger. When a user transitions from Open to In Progress, it will add a watcher to the watcher list. Everything works fine. I can remove this added user to the watcher list. However, if I transition back to Open, and then transition again to In Progress, this auto-added watcher cannot be removed from the watch list. The code to add user to the watcher list is as follows:
WatcherManager watcherManager = ComponentAccessor.getWatcherManager();
ApplicationUser user = ComponentAccessor.getUserManager().getUserByKey("testuser1");
watcherManager.startWatching(user, issue);
I even tried to remove that added user from the list, before going back to Open and to In Progress, still same problem.
Do you mean that you can not remove the user manually?
Maybe, the user, under whom you are trying to remove watchers, does not have the manage watcher list permission for the project.
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.