I want to block transition when my custom field( Customfield_19750) value is "Yes" I want a transition to happen only when a custom field value is "No".
Can you please help me where I am going wrong with my script? Many thanks
Here is the script I am using.
import com.atlassian.jira.component.ComponentAccessor
// Get the custom field manager
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def radioButtonField = customFieldManager.getCustomFieldObject("Field Name")
// Get the value of the radio button field for the current issue
def radioButtonValue = issue.getCustomFieldValue(radioButtonField)
// Check if the radio button value is "Yes"
if (radioButtonValue == "Yes") {
return false // Allow the transition to proceed
}
return true
But I am getting null pointer exception for this one