Custom duration interval
eazyBI for Jira
The Custom duration interval dimension will show the duration between two dates, calculated in intervals, usually from the start to the end date. In this example, it calculates the duration between the created and custom dates for all tickets. You may use any two dates instead. It is useful to group tickets by duration and show them in intervals.
Account-specific calculated field
Account specific calculated fields are defined in Source Data → Import options.
Settings for the new field
Internal name | durint |
|---|---|
Display name | Custom Duration Interval |
Data type | integer |
Dimension | ✓ |
Additional advanced settings |
|
Custom JavaScript code:
if(issue.fields.customfield_NNNNN) {
return (Date.parse(issue.fields.customfield_NNNNN) - Date.parse(issue.fields.created)) / 1000 / 60 / 60 / 24;
}
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_durint] name = "Custom Duration Interval" data_type = "integer" dimension = true javascript_code = ''' // Insert here the Custom JavaScript code ''' time_unit = "days" time_interval = "duration" intervals = "8,15,31" interval_unit = "days"