Custom JavaScript code

JavaScript code should be ES5 compliant, ES6 syntax is not supported.


You can use custom JavaScript code in import options "Additional options" tab to modify received issue JSON object before importing issues into eazyBI.
Click Add custom JavaScript code to show the code editor.

You can use issue variable to access received Jira REST API issue JSON object properties and modify or add additional properties. Please open JIRA_BASE_URL/rest/api/latest/issue/PPP-NNN?expand=changelog in your browser (where PPP-NNN is issue key) to see sample issue JSON.

Then switch to eazyBI import options and use the "Additional tab" to add custom Javascript code in the code editor [1]. You can test the code for one sample issue key in the validation area [2]  and see results in the results pane [3] [4]

Here is an example of JavaScript code which will clear issue summary property for issues with issue type bug

if (issue.fields.issuetype && 
    issue.fields.issuetype.name == "Bug") {
  issue.fields.summary = null;
}

If you would like to skip some data rows and do not import them in eazyBI then use return false; in these cases.

Custom Javascript code can not be used to create new custom fields for eazyBI.

In the case of new custom fields, please refer to Javascript custom fields page

Please contact eazyBI support if you need help to write a custom JavaScript code for your specific needs.