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.