[Bug 42389] New: Refactor Koha::Patron->can_checkout into Koha::Availability pattern
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42389 Bug ID: 42389 Summary: Refactor Koha::Patron->can_checkout into Koha::Availability pattern 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: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 41728, 42388 Koha::Patron->can_checkout currently returns a raw hashref with {can_checkout, debarred, expired} plus charge limit data merged in from is_patron_inside_charge_limits. It predates the Koha::Availability::Result pattern introduced in bug 41728 and lacks: - Standardized result envelope (blockers/warnings/confirmations) - no_short_circuit support for API consumers - Distinction between blockers and warnings - Overrides support for staff workflows This bug proposes: - Add Koha::Patron::Checkout::Availability as the patron-side checkout orchestrator, returning Koha::Availability::Result - Consume Koha::Policy::Patrons::ChargeLimits (bug 42388) for charge limit resolution instead of inlining it - Support no_short_circuit and overrides, consistent with Koha::Patron->can_place_holds and Koha::Item::Checkin::Availability - Deprecate the current can_checkout method once the new class is proven This is the patron-side counterpart to the future Koha::Item::Checkout::Availability, which would handle item-level checks currently in CanBookBeIssued. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41728 [Bug 41728] Add `Koha::Item::Checkin::Availability` to centralize logic https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42388 [Bug 42388] Extract patron charge limit resolution into Koha::Policy::Patrons::ChargeLimits -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42389 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42387 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42387 [Bug 42387] [UMBRELLA] Extend Koha::Availability pattern to checkout and hold operations -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42389 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@openfifth.c | |o.uk Depends on|41728 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41728 [Bug 41728] Add `Koha::Item::Availability::Checkin` to centralize logic -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org