Hello everyone.
I'm trying to create a script in a "create" postfunction to get an userpicker customfield value and with that value fill the assignee field.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue
def cf1 = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Nombre BR").toString()
issue.setAssignee(ComponentAccessor.getUserManager().getUserByName(cf1))
the code doesn't have any error but When I trying to create the issue. It doesn't nothing.
Also I tried put it in another transition after the issue creation. Same result.
The script execution doesn't have any error.
Is my code ok?
Thanks in advance.
Cheers