Hi @Sam3,
Welcome to the eazyBI community!
We do have a backlog feature request to implement configurable work hours calculations for time spent in status or transition, but that is a potential rabbit hole that is still gathering votes and has not reached the development stage yet.
Some results might be achieved using the JavaScript-calculated fields by combining the approach of Workhours (Assignment hrs work days eazybi - #2 by zane.baranovska) and the approach of time being within a period (Time that tickets stayed in a specific status during a specific period).
Still, that would have the following pitfalls to address:
- festive holidays from import settings are not observed by the script - they should then be added manually to the script and excluded from recorded time
- ongoing current time in specific status is not observed - depending on the final calculation used, the data might be correct only for the month that had ended before the last full data import.
- multiple transitions within a date would overwrite each other - might require additional coding to merge the time of multiple transitions within the same date
- the handling of various time zones differs between DC and Cloud instances - the scripts in the community posts are not explicitly aligning timezones
- stale issues have stale data - regular full data re-imports might be required to update time in statuses for the issues that are not being updated for long
- script that handles problems 1)-4) might be too complex to succeed within a reasonable timeout limit during the data import process.
An alternative option might be the MDX calculation that inspects each issue and then inspects the days between the initial transition to and the last transition from, for the number of transitions to/from status within the day.
That approach might theoretically work as long as there are no exiting transitions outside business hours.
The calculation might be so complex that it might exceed any reasonable timeout limits on a substantial dataset.
The measure “Workdays in transition status” is pre-calculated from issue changelog records during the data import using scripts.
I have to admit that the perfect solution for your case is yet to be made.
Regards,
Oskars / support@eazyBI.com