Due date changes by time
eazyBI for Jira
This custom field will count the changes of duedate field by time periods for each issue. It will be mapped to "Time" dimension and you can use the measure "Due date changes by time" to analyze the duedate field change counter by different time periods
Account-specific calculated field
Account specific calculated fields are defined in Source Data → Import options.
Settings for the new field
Internal name | ddchtime |
---|---|
Display name | Due date changes by time |
Data type | integer |
Measure | ✓ |
Additional advanced settings | multiple_dates = true |
Custom JavaScript code:
transitionsfrom = new Array; hasvalue = false; issue.changelog.histories.forEach(function(history){ history.items.forEach(function(historyItem){ if (historyItem.field == "duedate") { from = historyItem.fromString; to = historyItem.toString; if ( from != to ) { transitionsfrom.push(history.created.toString().substr(0,10) + ",1" ); hasvalue = true; } } }); }); if (hasvalue) { return transitionsfrom.join("\n"); }
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_ddchtime] name = "Due date changes by time" data_type = "integer" measure = true multiple_dates = true javascript_code = ''' // Insert here the Custom JavaScript code '''