I am writting a validator script that only allows transition when No is chosen but it blocks all transitions including when No is selected
import com.atlassian.jira.component.ComponentAccessor
def cfManager = ComponentAccessor.getCustomFieldManager()
def issue = issue
def customFieldName = "There are no previous withdrawals loaded for this contract"
def customField = customFieldManager.getCustomFieldObjects(issue).find {
it.name == customFieldName && it.getCustomFieldType()?.key == "com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons"
}
if (customField) {
def selectedOption = issue.getCustomFieldValue(customField)
if (selectedOption?.value = "No") {
return true
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.