Need Hours spent in diffrent ranges

HI Team,
I am trying to calculate the Hours spent in different ranges like <1hr,>=2h and <=8h etc.

But i am not able to find how to write ranges in new calculated measures.
Anyone please help me here?

Hi @uday_kalangi

Try creating a new custom dimension with Hours spent totals in intervals.
Use this code below with Javascript in your advanced settings.
That would group all issues based on their hours spent totals in intervals.

[jira.customfield_hsgr]
name = "Hours spent interval"
data_type = "decimal"
scale = 4
dimension = true
javascript_code = '''
var timesp = issue.fields.timespent
if (timesp){
issue.fields.customfield_hsgr = timesp
}
'''
time_unit = "seconds"
time_interval = "duration"
intervals = "1,2,8"
interval_unit = "hours"

After the field is selected and imported via import options page you could change intervals for this dimension as you need.
https://docs.eazybi.com/eazybi/analyze-and-visualize/interval-dimensions

Finally, you could use this interval dimension with “Issues resolved” to see how resolved issues are split by hours spent groups.

Martins / eazyBI support

Thanks Martin.
It worked