i use the following script to add myself and another team member to be watchers of ALL tickets.... as you can imagine it gets a little daunting.
import com.atlassian.jira.component.ComponentAccessor def watcherManager = ComponentAccessor.getWatcherManager() def userManager = ComponentAccessor.getUserManager() def watchUsers = {usernames -> usernames.each { def user = userManager.getUserByKey(it.toString()) watcherManager.startWatching(user, issue) } } def users = ["slopez", "llucania"] watchUsers(users)
Our helpdesk is broken into two request types - "Response Support" and "Helpdesk Support"
What would I modify in the script above to set myself to be added to all "Helpdesk Support" tickets only, and to have my other Colleague added to "Response Support" only.