hi all,
i'm trying to get customfield value but running is error. the customfield type is string script running is ok,but customfield type is select list running report error
def contactTypeCF = customFieldManager.getCustomFieldObject("customfield_10405")
def contactValue= issue.getCustomFieldValue(contactTypeCF )
======= the customfield type is string running ok
Hi @jollroy
Welcome to community.
What is the error? It seems fine indeed.
Try to test in script console for specific issue whose cf is not null. It should return select list value as string.
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.getCustomFieldManager();
def issue = ComponentAccessor.getIssueManager().getIssueObject("ABC-123");
def contactTypeCF = customFieldManager.getCustomFieldObject("customfield_10405");
def contactValue = issue.getCustomFieldValue(contactTypeCF)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.