Hello! I have this script, but it isn't assigning the watchers when it goes through the "create issue" transition. I was hoping to assign these people as watchers for this specific issue type we have. What might be wrong with it? I'm not strong at scripting, at all...so this is all pretty foreign to me. Thank you for your help!
import com.atlassian.jira.component.ComponentAccessor
def issueTypeWatchers = [
'Spares and Repair Parts': ['DG1459', 'BK8615','MS9025'],
]
issueTypeWatchers[issue.issueType.name].each{userName->
def user = userManager.getUserByName(userName)
def watcherManager = ComponentAccessor.getWatcherManager()
}