I'm trying to setup a 'Simple Scripted Validator' using ScriptRunner. That allows the transition, if the Radio button in question has 'No' selected.
"import com.atlassian.jira.component.ComponentAccessor
// Get the custom field manager
def CustomFieldManager = ComponentAccessor.getCustomFieldManager()
// Get the custom field by name
def approvalField = customFieldManager.getCustomFieldObjectsByName("Verification?")
// Get the value of the custom field for the current issue
def approvalValue = issue.getCustomFieldValue(approvalField as String)
// Check if the custom field value is not "Yes"
return approvalValue != "Yes"
return true"
The Script Editor likes the code, but the transition is blocked, whether 'Yes' or 'No' is selected!?
Can anybody show me where my code is wrong please?
Thanks.