I have a scriptrunner behavior that sets the values based on transition but want to have the default value "null" so that it says to select a value then have the values I have defined
import com.atlassian.jira.component.ComponentAccessor
import static com.atlassian.jira.issue.IssueFieldConstants.RESOLUTION
if (getActionName() == "Cancel Request") {
def constantsManager = ComponentAccessor.constantsManager
def allowedResolutions = constantsManager.resolutions.findAll {
it.name in ["Won't Do", "Duplicate", "Cannot Reproduce", "Cancelled", "Won't Fix", "Incomplete" ]
}
getFieldById(RESOLUTION).setFieldOptions(allowedResolutions)
}
