-
Notifications
You must be signed in to change notification settings - Fork 2
Description
When creating a period, it is possible to change the starting date to a past date.
Saving the period also saves it to the database refs.periods.validFrom.
From: libraries-fi/kirkanta-api#4
Changing past schedules is not allowed because users would most likely only screw them up unintentionally. There is no need to create schedules into the past as there is no use-case for that. The only supported case would be for statistics and this is also the reason why users are blocked from modifying the past.
Right now schedule modification apply starting Monday of the running week so that weekly tables could be fixed if there has been an error.
This restriction applies to API v3 as well;
https://github.com/libraries-fi/legacy-kirkanta/blob/master/module/ScheduleGenerator/src/Subscriber/GenerateSchedules.php#L54
https://github.com/libraries-fi/legacy-kirkanta/blob/master/module/ScheduleGenerator/src/Controller/ScheduleController.php#L67
Originally posted by @sjuvonen in libraries-fi/kirkanta-api#4 (comment)
Just accept that for some libraries there will be no schedules into the past, there is no other solution to it. For reference, in Kirjastohakemisto it is not possible to navigate into the past weeks at all.
Originally posted by @sjuvonen in libraries-fi/kirkanta-api#4 (comment)