Custom interval dimension for imported progress cycle measures

Hello @Drew_Grant !

Cycle day interval dimensions is a feature where we are collecting customer votes to decide when it might get into the development process.

And you are right currently possible workaround is a JavaScript calculated customfield dimension.

First, you would need to decide on using days, workdays, or work hours. In some cases workdays alone are not enough as business hours usually cover just one third of the day or close to that.

The JavaScript function for workhours can be found here - Assignment hrs work days eazybi - #2 by zane.baranovska.

Then, you need to create a JavaScript calculated customfield dimension calculating the actual time spent in the development cycle.

[jira.customfield_days_in_progress]
name = "In Progress workdays"
data_type = "integer"
dimension = true
javascript_code = '''
var transitto = Date.parse(issue.fields.created);
var statusList = ["Status 1","Status 2","Status 3","Status 4"];
var hours_in_statuses = 0;
var transitfrom = null;

issue.changelog.histories.forEach(function(history){
  history.items.forEach(function(historyItem){
    if (historyItem.field == "status") {
      transitfrom = Date.parse(history.created);
      var status = historyItem.fromString;
      if (statusList.indexOf(status) > -1) {
        hours_in_statuses += workinghours ( transitfrom , transitto ); 
      }
      transitto = transitfrom;
    }
  });
});
// divisor at end of next line denotes workhours in workday day  
  issue.fields.customfield_days_in_progress = hours_in_statuses/8;
'''
time_unit = "days"
time_interval = "duration"
intervals = "/5"
interval_unit = "days"

Regards,
Oskars / support@eazyBI.com