Automating Watchers

Deleted user May 23, 2018

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 "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.

 

Thanks in advance!

 

1 answer

0 votes
Bryan Robison May 23, 2018

How are "Response Support" and "Helpdesk Support" defined? Are they separate projects, components, or customer request types?

Deleted user May 23, 2018

Looks like they are setup as request types. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events