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

--- Comment #6 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 198831
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198831&action=edit
Bug 42386: Wire CanItemBeReserved to use availability classes

CanItemBeReserved is now a thin wrapper around
Koha::Item::Availability::Hold->check. All callers updated to expect
snake_case status strings.

Changes:
- C4::Reserves::CanItemBeReserved delegates to the new classes
- library_not_found check stays in the wrapper (branchcode → object)
- limit field extracted for too_many_* blockers
- club_holds_to_patron_holds.error_code ENUM migrated to snake_case
- All caller files updated (ILSDI, OPAC, staff, tests)

Assisted-by: Sonnet 4.6 (Anthropic)

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
   k$ updatedatabase
=> SUCCESS: ENUM migrated
   k$ prove t/db_dependent/Holds.t \
          t/db_dependent/Reserves.t \
          t/db_dependent/Reserves/MultiplePerRecord.t \
          t/db_dependent/api/v1/clubs_holds.t \
          t/db_dependent/Koha/Item/Availability/Hold.t \
          t/db_dependent/Koha/Patron/Availability/Hold.t \
          t/db_dependent/Koha/Biblio/Availability/Hold.t
=> SUCCESS: Tests pass!
3. Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to