Hi Atlassian Community!
Hopefully someone could help me out here. I need assistance on populating two custom fields into the Summary field that I will hide on my screen during the filling out of the issue/ticket.
I found this script online, but I'm having issues implementing it via Script Runner.
package UpdateIssue
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.MutableIssue
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();
issue.setSummary(customFieldManager.getCustomFieldObjectByName(“Legal Name”).getValue(issue).toString() + "/" + customFieldManager.getCustomFieldObjectByName(“Project Name/Code”).getValue(issue).toString())
I added this script by editing my workflow, going to Post Function in "Create."
When adding Post Function, used "Script Post-Function, and added the script (above).
Now, I'm receiving this error below.
The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.
2017-11-30 14:13:00,637 ERROR [workflow.ScriptWorkflowFunction]: *************************************************************************************
2017-11-30 14:13:00,648 ERROR [workflow.ScriptWorkflowFunction]: Script function failed on issue: null, actionId: 1, file: <inline script>
groovy.lang.MissingMethodException: No signature of method: com.atlassian.jira.issue.managers.CachingCustomFieldManager.getCustomFieldObjectByName() is applicable for argument types: (java.lang.Integer) values: [10900]
Possible solutions: getCustomFieldObjectByName(java.lang.String), getCustomFieldObjectsByName(java.lang.String)
at UpdateIssue.Script18.run(Script18.groovy:9)
Any help here would be greatly appreciated.