I'm using Jira and the Script Runner plugin to Create a sub-task on transition. That's all working well. However, I cannot seem to set the 'Assignee' of the Subtask to match the value of the 'Project Manager' listed on the parent (which is a custom field). Below is what I am using, But it does not work. What is the correct way to write this?:
issue.assignee = transientVars["originalissueobject"].cfValues['Project Manager']

I've Seen similar posts like this and this but nothing that shows how to Set the Assignee of a Sub-task based on the the Custom Field Value of the Parent Issue. Thanks for you Help!