adding watchers based on target milestone?

Mike Bresnahan June 25, 2013

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.

1 answer

0 votes
Ubisoft
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 17, 2013

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'))

}

Suggest an answer

Log in or Sign up to answer