The number of time spent by ticket

Hello,

I want to get the number of time spent by ticket. Can you give me an idea?

Thanks guys

Hi @chrisyounjai ,
There is an option to use the descendants() function but it could result in slow performance in case of huge data set.
The best is to check custom interval dimensions and create Hours spent as one - https://docs.eazybi.com/eazybijira/data-import/custom-fields/javascript-calculated-custom-fields#JavaScriptcalculatedcustomfields-Customcalculatedfieldasanintervaldimension

The Javascript code that you need to use in eazyBI advanced settings would be like this:

[jira.customfield_hoursspent_interval]
name = "Hours spent interval"
data_type = "integer"
dimension = true
javascript_code = '''
if (issue.fields.timespent) {
  issue.fields.customfield_hoursspent_interval = Math.floor(issue.fields.timespent/60/60);
}
'''
time_unit = "hours"
time_interval = "duration"
intervals = "/10"
interval_unit = "hours"

You can set the intervals as you wish: Interval dimensions - eazyBI for Jira
In the report it would look like this:

best,
Gerda // support@eazyBI.com