Hi,
I want to configure a behaviour on the resolution field that makes another field (ListTest) visible and required when the resolution of 'Rejected' is chosen. Here is my script that is currently not hiding the field nor making it required.
Please see script below and I have also attached the behaviour confg i am using...
import com.atlassian.jira.issue.resolution.Resolution
def resolutionField = getFieldById("resolution")
def listField = getFieldById("ListTest")
def resolution = resolutionField.getValue() as Resolution
if (resolution.name == "Rejected") {
listField.setRequired(true)
listField.setHidden(false)
} else {
listField.setRequired(false)
listField.setHidden(true)
}
Can anyone suggest what I am missing? Thanks