Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.7.0
-
None
Description
Current Situation
- If a Month Days restriction is used that holds a validity period, then target dates of a schedule are wrongly calculated:
- For the first month the begin of validity is added to the month days.
- Instead, the begin of month should be used when calculating month days.
- This applies to the schedule's preview and to orders created by the Daily Plan.
How to reproduce
- Assume a working day calender holding all days of year using the frequency "Every day"
- Specify the calendar validity: 12.12.2024 to 31.12.2025, see attached c1.workingdayscalendar.json
- Add a schedule based on the above calendar, see s1.schedule.json
- Add a restriction to the schedule using the frequency: Month Days (Count from First Day)
- Specify month days: 18th and 19th of month, see s1.schedule.json
- Specify validity: 13.12.2024 to 19.02.2025
- Verify wrong calculation:
- The 29th and 30th of December 2024 are incorrectly displayed instead of 18th and 19th, see show_preview.png. The reason being that for the first month the begin of validity, 13.12.2024, is added to the month days 18th and 19th which results in 29th and 30th of December.
- The Daily Plan is similarly created for 29th and 30th December 2024.
Desired Behaviour
- The Month Days frequency should calculate days of month from the begin of month instead of the begin of validity.
Attachments
Issue Links
- is duplicated by
-
JOC-1939 Schedule should consider valid-from/valid-to interval from calendar when using restriction month-days
- Dismissed