I have an add-on that adds watchers to a JIRA issue via the WatcherService.addWatcher method. I’ve noticed that once this has been applied to an issue, I can no longer drop the number of watchers on that issue below the number of times addWatcher has been called:
- If I called it once, there must always be one watcher on the issue. If I remove them and refresh the issue they pop back up.
- If I call it twice, there must always be at least two watchers on the issue. Again, they pop back up after a refresh if removed.
- In either case, I can swap who the watchers are, so it is not insisting that the user added via addWatcher watches the issue, but they do have to find someone to take their place. (I.e. If Bill and Ted are added as watchers via addWatcher, I can remove them and add Wayne and Garth, but now I can’t remove Wayne and Garth.)
I can find nothing interesting in the logs.
This has become a problem since it’s not obvious that the watcher removal didn’t work until after the page is refreshed: person A removes person B from an issue and then makes a comment that they didn’t want person B to see, but person B was not actually removed so still gets the watcher notification.
Is this a bug?