https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43493 Bug ID: 43493 Summary: Link Koha::Library opening hours with the library Calendar 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: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org Depends on: 43492 Blocks: 36079 Target Milestone: --- Bug 36079 points out that library opening hours and the library Calendar are not linked in any meaningful way: a library can have a weekly closure configured for a day it also has opening hours set for, and nothing reconciles the two - they are entirely separate subsystems that happen to share a library_id foreign key. Building on the library_opening_hours facade from Bug 43492, this bug adds a Koha::Library->opening_hours accessor and makes the facade's availability checks (is_open_at, next_change) consult Koha::Library->calendar->is_holiday first: if the Calendar says the library is closed that day for any reason (weekly closure, repeating closure, single closure, correctly excluding exception-override days), opening hours checks report closed regardless of what hours are configured. This resolves Bug 36079 by composing the two existing facades rather than merging their storage - Calendar remains the source of truth for whether the library is open at all on a given day, and Opening Hours remains the source of truth for which windows it is open during. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36079 [Bug 36079] Library hours and the Calendar are not linked in any meaningful ways 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 watching all bug changes. You are the assignee for the bug.