I am trying to use a simple scripted validator that will block a transition if a radio button has not been left as the default option "none".
The field with my radio button is field ID 10700. The default option of the field is "None" and I would like my script to pass validation, only when any radio button other than "None" has been selected.
The current behaviour is that it is correctly blocking the transition when the radio button is "None" however it is also blocking the transition when any other radio button is selected, where it should be allowed.
Can anyone shed any light where I am going wrong with my script? Many thanks
Here is my script
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.Issue
CustomField radioButton = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("10700");
if(radioButton == null)
return false
if(radioButton.getValue(issue).toString().equals("None"))
return false
else
return true