https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43492
Bug ID: 43492
Summary: Normalize library opening hours into a dedicated
library_opening_hours table
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]
Target Milestone: ---
Library opening hours (Bug 6796) are stored in a single library_hours table
with a composite (library_id, day) primary key: exactly one row per weekday per
library. This makes it structurally impossible to record more than one
opening/closing pair per day (Bug 37616, Bug 37708), and there is no way to
represent hours that open on one day and don't close again until a later day
(raised as a concern on Bug 36596 against a simple "open and close must always
be set together" rule).
The Koha::Library::Hour(s) object classes are empty shims with no validation,
and there is no relationship at all between these hours and the library
Calendar (weekly/repeating/single closures, Bug 42310/42314/42311), which is
the underlying problem in Bug 36079.
This is the first of a small dependent series that replaces library_hours with
a normalized model. This bug covers the schema and object layer:
- A new library_opening_hours table, allowing any number of rows per (library,
weekday), with an explicit closes_opening_id self-reference so a slot that
opens on one day and doesn't close until a later day is represented as two
clearly linked rows rather than by guesswork or an offset column.
- A new OPENING_HOURS_TYPE authorised value category (seeded with a reserved
GENERAL value) so hours can be grouped by what they're for (Bug 37708), reusing
Koha's existing authorised values admin screen rather than a bespoke
vocabulary.
- A Koha::Library::OpeningHours facade (mirroring Koha::Library::Calendar)
providing validated CRUD and interval resolution.
Migration of existing library_hours data to type GENERAL is included.
Follow-up bugs build the Koha::Library accessor and Calendar linkage, REST API,
circulation integration, and the admin interface on top of this.
--
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/