From 8d9fd6007d20d2fb7bc8b3723e4d57ee5d6e21d8 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Mon, 22 Oct 2018 15:17:14 -0400 Subject: [PATCH] Lp 1799272: Limit SIP2 hold items to available hold items. Only inlcude holds that are available for pickup in the hold items count and hold items fields of the SIP2 patron information response. Given some confusion over the purpose of this field, that there is also a field to list unavailable holds, and that a list of holds avaialable for pickup would be more useful than a list of all holds to a patron using a self-check, this seems like a good change. Signed-off-by: Jason Stephenson --- Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm index 3b458cb784..67bc8ef007 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm @@ -514,18 +514,19 @@ sub too_many_billed { # -# List of outstanding holds placed +# List of available holds # sub hold_items { my ($self, $start, $end, $ids_only) = @_; syslog('LOG_DEBUG', 'OILS: Patron->hold_items()'); - # all of my open holds + # all of my available holds my $holds = $self->{editor}->search_action_hold_request({ - usr => $self->{user}->id, - fulfillment_time => undef, - cancel_time => undef + usr => $self->{user}->id, + fulfillment_time => undef, + cancel_time => undef, + current_shelf_lib => {'=' => {'+ahr' => 'pickup_lib'}} }); return $holds if $ids_only; -- 2.11.0