https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43507

            Bug ID: 43507
           Summary: Add date-specific and annually-repeating opening hours
                    overrides
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
        Depends on: 43492
  Target Milestone: ---

library_opening_hours (Bug 43492) only models a recurring weekly pattern - e.g.
"every Tuesday, 9-17". There is no way to represent a library's opening hours
differing from their normal weekly pattern on a specific date (e.g. shortened
hours on Christmas Eve) without the library being fully closed that day.

Koha::Library::Calendar solves the equivalent problem for closures with
distinct weekly/repeating/single/exception concepts, but Calendar is binary
(open or closed) and has no way to express "open, but with different hours" at
all. This is a real gap: hourly bookings need to know the actual hours for a
specific date, not just the general weekly pattern, and libraries want to
publish holiday-specific hours on the OPAC.

Proposed approach: two new tables, library_opening_hours_dates (one-off dates)
and library_opening_hours_repeating_dates (annually-repeating month/day
patterns, so a library does not have to re-enter the same Christmas Eve hours
every year), plus a date-aware Koha::Library::OpeningHours->hours_for_date
method that resolves overrides (exact date, then repeating date) before falling
back to the normal weekly pattern.

Test plan:
1. Add a normal Tuesday 09:00-17:00 GENERAL slot for a library.
2. Add a one-off date override for a specific Tuesday with different hours;
confirm hours_for_date resolves the override for that date and the normal
weekly hours for every other Tuesday.
3. Add an annually-repeating override (e.g. day 24, month 12); confirm it
resolves for that date in any year, and that an exact-date override takes
precedence over a repeating one when both exist for the same date.

Depends on Bug 43492.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43492
[Bug 43492] Normalize library opening hours into a dedicated
library_opening_hours table
-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to