Count issues by shift (based on time)

We have 3 shifts during the day and I would like to calculate productivity for each shift.

To do this for example I would have to count tickets that were resolved between 10 AM and 6:30 PM and I want to be able to do this per week and per day.

If I view issues individually I’m able to extract/calculate the resolved time from the Transition to status last date as follows:

Format([Issue].CurrentMember.get(‘Resolved at’),“hh:mm”)

However, I cannot figure out a way to compare this time to be => 10:00 and <= 18:30.

Hi,

There might be several solutions of how to check if the date is within some time interval of hours. You can use the Hours and Minutes functions of MDX to extract the time components and construct the condition you need.

Another solution is to use the function “TimeValue” which can extract the time part of the date. This function can be combined with the “DateBetween” to check if the time part is within some specific interval:

DateBetween(
  TimeValue([Issue].CurrentMember.getdate('Resolved at')),
  TimeValue(DateParse("2000-01-01 10:00:00")),
  TimeValue(DateParse("2000-01-01 18:30:00"))
)

Kindly,
Janis, eazyBI support

I solved it by setting in the advanced settings the following code
[jira.customfield_hour_of_day_resolved]
name = “Hour of Day Resolved”
data_type = “integer”
dimension = true
javascript_code = ‘’’
var hours = new Date(Date.parse(issue.fields.resolutiondate)).getHours();
issue.fields.customfield_hour_of_day_resolved = hours;’’’

And then importing it as a custom field Dimension.
Then define calculated members by adding the hours for every shift.