We're using scriptrunner, and I'd like to custom script a post function to do this. I've given it a shot, and I'm not getting the watchers, but there are no errors.
Here's the most recent version of the script...
import com.atlassian.jira.component.ComponentAccessor
log.debug "In WATCHER Script"
def CustomFieldManager = ComponentAccessor.getCustomFieldManager()
def websiteCustomField = CustomFieldManager.getCustomFieldObjectByName('Website')
def websiteValue = issue.getCustomFieldValue(websiteCustomField)
log.debug 'websiteCustomField is' + websiteCustomField
log.debug 'websiteValue is ' + websiteValue
if(websiteValue == '[Oracle Commerce Backend]') {
def watcherManager = ComponentAccessor.getWatcherManager()
def userManager = ComponentAccessor.getUserManager()
watcherManager.startWatching(userManager.getUserByKey('user1'), issue)
watcherManager.startWatching(userManager.getUserByKey('user2'), issue)
log.debug('user1 and user2 should be watchers')
}