IssueChangeHolder changeHolder = new DefaultIssueChangeHolder();
FieldLayoutItem fieldLayoutItemResolver = componentManager.getFieldLayoutManager().getFieldLayout(issue).getFieldLayoutItem(customField);
customField.updateValue(fieldLayoutItemResolver, issue, new ModifiedValue((SelectCFType) customField.getValue(issue), "Closed Issue"),changeHolder);
I am getting the following exception.
javax.script.ScriptException: javax.script.ScriptException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'Known Issue Documented' with class 'com.atlassian.jira.issue.customfields.option.LazyLoadedOption' to class 'com.atlassian.jira.issue.customfields.impl.SelectCFType'
I know this is a type cast exception which is from the highlited code. can any one tell me how to get the reference of required SelectCFType object?