I need to add watchers when a target milestone is set to a specific value. e.g. when target milestone is set to 'RPS' a watcher needs to be automatically added to the watch list.
I haven't been able to find a place to implement this kind of rule.
You may want to try a Groovy script that will add a watcher depending on a custom field value.
For ex, I did this one for one of my workflow. Basically it will set the assignee depending on a customfield value upon issue creation. :
import com.atlassian.jira.ComponentManager def cfManager = ComponentManager.instance.customFieldManager def cfRadioButton = cfManager.getCustomFieldObjects(issue).find {it.name == 'Need Audio Component'} String cfValue = issue.getCustomFieldValue(cfRadioButton).getValue() if (cfValue == "Landmark") { issue.setAssignee(ComponentManager.instance.userUtil.getUserObject('leadaudio')) } else { issue.setAssignee(ComponentManager.instance.userUtil.getUserObject('defaultaudio'))
}
It looks like you're new here. Sign in or register to get started.