Hourly time hierachy

Is there a way to create an hourly time hierachy. I want to create a dashboard for the service department to track performance in real time

Hi @shafiek.bloew,

In eazyBI, “Day” is the lowest level in the Time dimension. Creating a new hierarchy with the “Hour” level is not possible.

As an alternative, you can try to create a new JavaScript calculated custom field interval dimension. Based on the issue creation date, you could see the number of issues created in each hour. See the picture of a sample report below:

To create such a dimension, add the following code to the eazyBI advanced settings:

# Hourly interval dimension
  [jira.customfield_hour_of_day2]
  name = "Hour of Day"
  data_type = "integer"
  dimension = true
  javascript_code = '''
    var hours2 = new Date(Date.parse(issue.fields.created)).getHours();
    issue.fields.customfield_hour_of_day2 = hours2;
  '''
  time_unit = "hours"
  time_interval = "interval"
  intervals = "/1"
  interval_unit = "hours"

After updating the advanced settings, you can select the custom field for import in the eazyBI import options “Custom fields” tab as a dimension.

Best,
Roberts //support@eazybi.com

1 Like

Thanks for the feedback - Ill try it out

Hi

I tried this solution, but regardless whether I try getHours() or getUTCHours(), the hour returned is 5 hours off.

I have also tried this code but it did not change anything:
hours2.setMinutes(hours2.getMinutes() + hours2.getTimezoneOffset());

Hi @massaf ,

Do your Jira and eazyBI timezone settings match, or are you on eazyBI for Jira Cloud? In Cloud, the getTimezoneOffset() method will return the Cloud data center local time zone offset, which is 0, as it is in UTC+0.

I am afraid the only viable option is to adjust the difference in the JavaScript code manually.

Best,
Roberts // support@eazybi.com