Hi Guys,
I am trying to set Cascading select list field description based on Parent Value using Script Runner behaviour . Not giving any error and not updating the description of the field. Kindly suggest where am i doing wrong. I have tried script avaiable at this link :- https://library.adaptavist.com/entity/set-a-default-option-on-a-cascading-select-list
It's also not working for me.
Tried to apply at script at intilizer as well as on field . On both case not working.
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
// the cascading select field that you want to set
final fieldName = 'Activity'
// parent value that you want to select
final parentValue = 'RFP Creation & Distribution'
// child value that you want to select
final childValue = 'RFP Request sent to GOSS'
def field = getFieldByName(fieldName)
def optionsManager = ComponentAccessor.optionsManager
def customField = ComponentAccessor.customFieldManager.getCustomFieldObjects(issueContext.projectId, issueContext.issueTypeId).findByName(fieldName)
def fieldConfig = customField.getRelevantConfig(issueContext)
def options = optionsManager.getOptions(fieldConfig)
if (options.find { it.value == parentValue }){
field.setDescription("Start typing to get a list of possible users")
}