Hi Guys and Gals,
Absolutely pulling my hair out with this. Have scoured the bowels of the internet and kinda cobbled a script together. It is as follows....
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssueString
userName;switch(ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Overtime Type").toString()){
case "TOIL": userName = "user1";break;
case "PAID": userName = "user2";break;
}issue.setAssignee(ComponentAccessor.getUserManager().getUserByName(userName))
I am attempting to do this as a post-function on the create transition.
Please please can anyone help. I am using JIRA 8.5.4
Thanks in advance and hoping for a favourable reply,
Darren