I use the following code to copy parent description to a scripted field called Parent Description. I need the same thing but now i want to copy a user picker customfield_14468 to scripted filed called PM. How can i call/define parents customfield just like i called parents description in below code? Any thoughts?
I put this code in the scripted field.
Thanks
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.component.ComponentAccessor;
if (issue.getProjectObject().getKey() == 'MCO')
{
def field =ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Parent description")
def newfield = issue.getParentObject().description;
return newfield;
}