Days in Current Status Report

Hi Brian,

it seems you may want to benefit from Age in current status interval dimension (instead of Age dimension). This would be a custom dimension.
To get such a dimension, the following steps would be needed:

1.Start with creating a new calculated custom field in eayzBI advanced settings by pasting there the code below:

[jira.customfield_ageinstatus]
name = "Age in current status"
data_type = "integer"
dimension = true
javascript_code = '''
ageinstatus = 0;
issue.changelog.histories.forEach(function(history){
  history.items.forEach(function(historyItem){
    if (historyItem.field == "status") {
     ageinstatus  = Math.floor(Date.parse(history.created) / 1000);
    }
  });
});
if (ageinstatus == 0) {
	ageinstatus = Math.floor(Date.parse(issue.fields.created) / 1000);
}
issue.fields.customfield_ageinstatus = ageinstatus;
'''
time_unit = "seconds"
time_interval = "age"
intervals = "15,28,42,56"
interval_unit = "days"

The formula above calculates time in the last status and creates intervals for 15 days, 15-27 days, 28-41 days, 42-56 days, and more than 56 days.

  1. After updating settings, you should import this field into eazyBI as a dimension. For that, open import settings for edit and select this custom field for import as a dimension. Then run data import. During that, a new dimension ‘Age in current status’ will be created.

  2. In the report, you can use the default measure ‘Issues created’ and this new dimension ‘Age in current status’ in rows and ‘Status’ dimension in columns.

For more detailed assistance, please contact eazyBI support via email support@eazybi.com

Ilze, support@eazybi.com