When I am trying out some custom JavaScript code, I get an error stating: “Execution of custom JavaScript code raised the following error: ReferenceError: “jira” is not defined.”
I have inputted the following JavaScript code:
[jira.customfield_descr]
data_type = “string”
if (issue.fields.summary) {
issue.customfield_descr = “test”;
}
When testing JavaScript in import options tab “Additional options”, paste only the JavaScript code without advanced settings.
if (issue.fields.summary) {
issue.customfield_descr = “test”;
}
When the code is tested on individual issues, you are ready to create a JavaScript-calculated custom field in eazyBI advanced settings. Now add the advanced setting parameters representing custom field identifier (jira.customfield_descr), name, data type and javascript_code: