Details
-
Fix
-
Status: Released (View Workflow)
-
Major
-
Resolution: Fixed
-
2.0.0
-
None
Description
Current Situation
- If time zones are configured with Settings->dailyplan->time_zone, and the time zone of a schedule doesn't match, then the Daily Plan entries can either be assigned to the next day or will not be added at all.
- Daily Plan Calculation Details:
- The calculation to determine if a given start time aligns with a Daily Plan date involves two checks:
- FrequencyResolver
- This component identifies working days based on the calendar and schedule definitions
- Calculates the days for the given Daily Plan date and for the following day
- It may return two days if the next day is considered a working day
- This component identifies working days based on the calendar and schedule definitions
- PeriodResolver
- This uses Settings->dailyplan->time_zone to determinate the begin and end of a given day's period
- This check examines whether the start time of a day calculated by the FrequencyResolver matches the specified Daily Plan date
- FrequencyResolver
- The calculation to determine if a given start time aligns with a Daily Plan date involves two checks:
Current Situation Examples
- Settings->dailyplan->time_zone= Etc/UTC, period_begin=00:00
- Daily Plan date: 2023-10-25
- Schedule with a single start at 01:00(Europe/Berlin)
- calculated Daily Plan day period for 2023-10-25 based on Daily Plan Settings:
- (UTC)2023-10-25 00:00:00 to 2023-10-26 00:00:00
- calculated start based on the DailyPlan, Schedule settings and FrequencyResolver day:
- FrequencyResolver day=2023-10-25
- (UTC)2023-10-24 23:00:00
- skipped because it's not within the DailyPlan day period
- FrequencyResolver day=2023-10-26 (this iteration for 2023-10-26 only occurs if the FrequencyResolver has delivered 2 days (2023-10-25, 2023-10-26))
- (UTC)2023-10-25 23:00:00
- added, but for the next day
- (UTC)2023-10-25 23:00:00
- calculated Daily Plan day period for 2023-10-25 based on Daily Plan Settings:
- Schedule with a single start at 22:30(America/Chicago)
- calculated the DailyPlan Day period for 2023-10-25 based on DailyPlan Settings
- (UTC)2023-10-25 00:00:00 to 2023-10-26 00:00:00
- calculated Start based on the DailyPlan, Schedule settings and FrequencyResolver day
- FrequencyResolver day=2023-10-25
- (UTC)2023-10-26 03:30:00
- skipped because it's not within the DailyPlan Day period
- FrequencyResolver day=2023-10-26 (this iteration for 2023-10-26 only occurs if the FrequencyResolver has delivered 2 days (2023-10-25, 2023-10-26))
- (UTC)2023-10-27 03:30:00
- skipped because it's not within the DailyPlan Day period
- as aresult this start time will never be added to the DailyPlan
- calculated the DailyPlan Day period for 2023-10-25 based on DailyPlan Settings
Desired Behavior
Daily Plan dates should be accurately calculated for Daily Plan settings
Maintainer Note
- The time zone defined within the Settings->dailyplan should impact the start of the Daily Plan service only.
- The frequency calculation is based on a single day, which is the DailyPlan date.
- The period calculation relies on the time zone specified by the schedule.
Test Instructions
- use different time zones for Settings->dailyplan and schedule.
- use different start times (e.g. at begin and end of a day)
- use periods with single start(s) and repeated periods
- use default(00:00:00) Settings->dailyplan->period_begin and different from midnight(see
JOC-1329) - use non-working days feature tests (see
JOC-1484) - create DailyPlan manually and via the DailyPlan Service