Good day!
Sorry for my bad English)
I wrote the script in post-function, but he is not work.
We need to change the custom field to the value of the system field, and if the custom field is already filled, then put its value in the system. I hope I have expressed clearly 
Script:
import com.atlassian.jira.component.ComponentAccessor
def bf = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Исполнитель")
def br = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Технолог");
if(br) {
return issue.getCustomFieldValue(bf)
} else{
ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Исполнитель")
return issue.getCustomFieldValue(br)
}
Error:
2018-09-19 12:17:55,896 ERROR [workflow.ScriptWorkflowFunction]: *************************************************************************************
2018-09-19 12:17:55,897 ERROR [workflow.ScriptWorkflowFunction]: Script function failed on issue: PB-420, actionId: 331, file: <inline script>
java.lang.NullPointerException
at com.atlassian.jira.issue.IssueImpl.getCustomFieldValue(IssueImpl.java:896)
at com.atlassian.jira.issue.Issue$getCustomFieldValue$1.call(Unknown Source)
at Script151.run(Script151.groovy:5)
Please help me fix the script...
Thank you in advance!