Hi,
Having an issue with a similar code.
It's not auto assigning issues on creation using "Custom script post-function (inline script)" in the workflow post function.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.crowd.embedded.api.User
String user;
def cfManager = ComponentAccessor.getCustomFieldManager();
def cf = cfManager.getCustomFieldObjectByName('field name');
switch(issue.getCustomFieldValue(cf) as String){
case 'value 1': user = "email address";break;
case 'value 2': user = "email address";break;
}
issue.setAssignee(ComponentAccessor.getUserManager().getUserByKey(user))
However, results display confirmation copy of no failures:

I'm working within JIRA upgraded version 7.13.2.
Would it be possible for someone to provide advice on how to fix this?
Also, legacy script for auto-assignation is not working when placed in a new workflow, even though I've updated relevant custom fields and reference links. Does anyone know why this would be happening?
Thanks.