Using this as an example: https://scriptrunner.adaptavist.com/latest/jira/recipes/behaviours/select-list-other.html
the sample code has not effect on the targeted field. So I tried another approach. No errors reported in the chrome inspector, lots of errors in the JIRA log.
1 error
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during instruction selection: java.lang.NoClassDefFoundError: Unable to load class com.onresolve.scriptrunner.runner.customisers.RapidViewServiceBridge due to missing dependency com/atlassian/greenhopper/service/rapid/view/RapidViewService
java.lang.RuntimeException: java.lang.NoClassDefFoundError: Unable to load class com.onresolve.scriptrunner.runner.customisers.RapidViewServiceBridge due to missing dependency com/atlassian/greenhopper/service/rapid/view/RapidViewService
the script:
def bleedField = getFieldByName('Bleed')
def otherBleedField = getFieldById('customfield_11403')
def bleedFieldVal = bleedField.getValue()
if (bleedValueVal){
if (bleedFieldVal == "Other"){
otherBleedField.setHidden(false)
otherBleedField.setRequired(true)
}else{
otherBleedField.setHidden(false)
}
}else{
otherBleedField.setHidden(true)
}
So I tried the exact syntax from the example again
def otherBleedField = getFieldByName("Bleed (Other)")
def bleedField = getFieldById(getFieldChanged())
def selectedOption = bleedField.getValue() as String
def isOtherSelected = selectedOption == "Other"
otherBleedField.setHidden(! isOtherSelected)
otherBleedField.setRequired(isOtherSelected)
and the field is hidden and nothing can be done to change that. And this is a plugin for which I've paid for a 50 user license. Going to file this on their support site (? exists ?) now.