Previous due dates
This custom field will generate a set of previous due dates in a string. You can import it as a property and show the results for "Issue" dimension members at the issue level.
Account-specific calculated field
Account specific calculated fields are defined in Source Data → Import options.
Settings for the new field
Internal name | prevdd |
---|---|
Display name | Previous due dates |
Data type | text |
Custom JavaScript code:
var previousDuedate = new Array(); if (issue.changelog && issue.changelog.histories) { // first_change = true; for (var i=0; i < issue.changelog.histories.length; i++){ var history = issue.changelog.histories[i]; for (var a=0; a < history.items.length; a++) { var item = history.items[a]; if (item.field == "duedate" && item.from) { previousDuedate.push(item.from); } } } } if (previousDuedate) { return previousDuedate.join(","); }
Global calculated field
Global calculated fields are defined in eazyBI advanced settings.
Here are the settings for the new field definitions. You should insert the JavaScript (the code given above) below the line // Insert here the Custom JavaScript code
. Keep the opening and closing quotation marks. '''
, do not delete them.
[jira.customfield_prevdd] name = "Previous Due dates" data_type = "text" javascript_code = ''' // Insert here the Custom JavaScript code '''