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 <david@davidnind.com> Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
d8cf6da3a2
commit
eb57856091
|
|
@ -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 => [],
|
||||
|
|
|
|||
Loading…
Reference in New Issue