From eb57856091c4ec9c4fb4f43e6438eeb1ac2be5c9 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 28 May 2026 09:10:34 -0400 Subject: [PATCH] Bug 42700: hold_items in SIP patron info should contain all holds, not just waiting Some 3rd party SIP clients calculate the number of holds ready for pickup as: holds ready for pickup = hold_items - unavail_holds Right now this can produce a negative number since hold_items contains only waiting holds. This patch makes hold_items contain all of the patron's holds, so hold_items - unavail_holds correctly gives the count of holds ready to be picked up. Test Plan: 1) Apply the first patch only 2) prove t/db_dependent/SIP/Patron.t 3) Note the new "hold_items counts all holds" subtest fails 4) Apply this patch 5) prove t/db_dependent/SIP/Patron.t 6) Note the tests pass! Signed-off-by: David Nind Signed-off-by: Aleisha Amohia Signed-off-by: Pedro Amorim --- C4/SIP/ILS/Patron.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm index 0b6ce390d7..68be7f8962 100644 --- a/C4/SIP/ILS/Patron.pm +++ b/C4/SIP/ILS/Patron.pm @@ -168,7 +168,7 @@ sub new { screen_msg => 'Greetings from Koha. ' . $kp->{opacnote} . $fines_msg, print_line => '', items => [], - hold_items => $flags->{WAITING}->{itemlist}, + hold_items => $patron->holds->unblessed, overdue_items => $flags->{ODUES}->{itemlist}, too_many_overdue => $circ_blocked, fine_items => [],