Hour interval for Time first response

Hi,

I am new to eazyBI, I would like to ask a question:
How can I categorize the value of a measurement in hourly intervals?

Example:

Hour intervals Time first response
0-4 10
5-8 15
9-32 11
32 10

I need to create an hourly interval chart for the first response.

Thank you very much in advance for your help
Patricio

Hi @Patricio_Gonzalez,

You can create interval dimensions in eazyBI for numeric custom fields.

Suppose the first response time is Jira Service Management field. Then the solution would be as follows:

  1. In import options, tab Custom fields, add a new calculated custom field. Here are more details on calcauted custom fields: Account specific calculated fields.
    The configuration for “First response time interval” custom field might look like this
    1.1) Select data type “integer” and options “Dimension” and “Measure”
    1.2) Define parameters for the intervals in the “Additional advanced settings” field:

    time_unit = "seconds"
    time_interval = "duration"
    intervals = "4,8,32"
    interval_unit = "hours"
    

    1.3) Write the JavaScript to retrieve the first response time from JSM fields. The code example below refers to customfield_10069, which is the field ID for the “First Response Time” in my Jira instance. You should update the javaScript accordingly with the custom field ID matching yuor Jira instance.

    // Check if the custom field exists and has completedCycles attribute
    if (issue.fields.customfield_10069 && issue.fields.customfield_10069.completedCycles) {
      if (issue.fields.customfield_10069.completedCycles.length > 0 && issue.fields.customfield_10069.completedCycles[0].elapsedTime) {
        // Return the response time in milliseconds for the last cycle
        var durationmillis = issue.fields.customfield_10069.completedCycles[0].elapsedTime.millis;
        //convert miliseconds to seconds as time_unit expects for interval dimension
        return Math.round(durationmillis / 1000);
      }
    }
    

    1.4) Test the code on a couple of issues to see if it retrieves the correct data.
    The field configuration might look like in the picture below:

  2. Import the new custom field as a dimension.

  3. In the report, use the new"First response time interval" dimension to group issues by their first response time. Select measure “Time to first response Issues” on the report columns.
    If you like, you can adjust the intervals as described in the documentation: Interval dimensions

You can check out this Community post for a similar use case:
Need Hours spent in diffrent ranges.

Best,
Zane / support@eazyBI.com

Hi Zane, it worked perfect, thank you very much!

Regards
Patricio

1 Like