next challenge, this is a small piece of a larger project.
Scope:
2 Date and Time custom fields.
Compare both dates and:
(where I need your help):
Custom Field Number "Total Time" = Total minutes between both (End Date - Start Date).
Custom Field Number "Working Minutes First Hour" = 0 to 60
number of minutes (60 max) within the first 60 minutes during weekdays
Custom Field Number "Working minutes Next hours" = number of hours (or minutes) in start and end date range that bellongs to a working day (monday 00:00 to friday 23:59)
Custom Field Number "Total minutes NON working day" = number of hours (or minutes) in start and end date range that bellongs to a NON woking day (Saturday 00:00 to Sunday 23:59 + List of bank holidays)
Custom Field Number "Total minutes Night Time" = Total time between 22:00 and 07:00.
Examples:
Start Time = 2023/08/08 19:30; End Time 2023/08/08 21:00
Total Time = 90
Working minutes First Hour = 60 (from 19:30 to 20:30)
Working minutes Next Hour = 30 (from 12:30 to 21:00)
Total minutes NON working day = 0
Total minutes Night Time = 0
..
..
Examples:
Start Time = 2023/08/04 21:30; End Time 2023/08/05 01:15
Total Time = 225
Working minutes First Hour = 60 (from 21:30 to 22:30)
Working minutes Next Hour = 90 (from 22:30 to 23:59)
Total minutes NON working day = 75 (from 00:00 to 01:05)
Total minutes Night Time = 195 (from 22:00 to 01:15)
..
..
These are to be added as automation, once the ticket is created.