Hello,
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,
Hi Eryk,
why don't you put them all in a self defined group and add the notification to that group in the notification scheme to the event "Issue Created"?
Hi Thomas,
Because I want to avoid managing those groups (new hires etc.) as an administrator.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
but adding and removing users to/from the "add-and-remove-watchers-function" is also an administrative effort ;-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You've got a point there :) But I also want to send those emails for specific issue types i.e. only Defects for one project, Story for another.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.