Hi guys,
Jira software - Server - Script Runner
By means of a post function of script runner, I am trying to establish or select the value of a custom field of type "Project picker", but I have not been successful.
def cfSelect = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("associated project")
def cfConfig = cfSelect.getRelevantConfig(issue)
def value = ComponentAccessor.optionsManager.getOptions(cfConfig)?.find {
it.toString() == 'Project XXX'
}
issue.setCustomFieldValue(cfSelect, value)
This code works perfectly with custom fields of type list, but not with custom fields of type "Project picker".