Hi I have found a script that I want to make work in a Script Runner Custom field to display the full name not the username, which I then can use in the Jira macro in Confluence. My lack of groovy knowledge has me stuck on the 'token' error shown in snip .
Full script below:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.user.ApplicationUserCustomField field = ComponentAccessor.customFieldManager.getCustomFieldObjectsByName("Owner")[0]
// if there is no value for this field, exit the script
if (!issue.getCustomFieldValue(field))
returnreturn (issue.getCustomFieldValue(field) as ApplicationUser).displayName
Thanks in advance
Cheers
Gordon