We want to add or remove watchers automatically during a workflow transition, per person or all persons belonging to a group. Any ideas how to do that?
JIRA version is up to date.
Thx
Simon
You'll need some code to do that.
As usual, I'd reach for the script runner plugin and writing a post-function script...
I have found this one, but it does not work:
import com.atlassian.jira.ComponentManager def componentManager = ComponentManager.getInstance() def watcherManager = componentManager.getWatcherManager() def userManager = componentManager.getUserUtil() def watchUsers = {usernames -> usernames.each { def user = userManager.getUser(it) watcherManager.startWatching(user, issue.getGenericValue()) } } def users = ["comma", "separated", "usernames"] watchUsers(users)
It looks like you're new here. Sign in or register to get started.