To Set it:
import com.atlassian.jira.component.ComponentAccessor def customFieldManager = ComponentAccessor.customFieldManager def crtField = customFieldManager.getCustomFieldObjects(issue).find{it.name == "Customer Request Type"} issue.setCustomFieldValue(crtField, "Desired Request Type")
To Clear it:
This works better than using JSU to "Clear Field Value"; as JSU does not clear it.
import com.atlassian.jira.component.ComponentAccessor def customFieldManager = ComponentAccessor.customFieldManager def crtField = customFieldManager.getCustomFieldObjects(issue).find{it.name == "Customer Request Type"} issue.setCustomFieldValue(crtField, null)
After the script is executed, You can use "'Customer Request Type IS EMPTY" on the field.