In workflow create action I have post function which adds specific user to watcher list (service user). Goal is to enable sending email notifications about created issue to group of people (mailing list). I wanted to first add this service user as a watcher and than after email notification is sent remove the user from watcher in order to avoid receiving spam.
The problem is that I can't force JIRA to remove user from watchers in post function (after firing JIRA issue created event) or in script listener (event Issue Created). stopWatching(user, issue) function just doesn't work. Moreover getWatchersUnsorted(issue) function gives me list of watchers (my service user is present in that list), but when I run isWatching(user, issue) method with my user it always returns false.
I also tried to programmatically reindex issue but this also didn't work.
Any ideas? Thanks,
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG