From 740e424a04de52a5d63e771cb11f163c3bc30f21 Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 29 Mar 2011 16:51:54 +0000 Subject: [PATCH] Inspired by a 1.6 patch from Brandon Uhlman to collect the set of holds not ready for pickup, 2.0+ style git-svn-id: svn://svn.open-ils.org/ILS/trunk@19894 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm | 22 +++++++++++++++++----- 1 file changed, 17 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 214281ac8f..c792d2a958 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm @@ -587,11 +587,23 @@ sub recall_items { } sub unavail_holds { - my ($self, $start, $end) = @_; - my @holds; - syslog('LOG_DEBUG', 'OILS: Patron->unavail_holds()'); - return (defined $start and defined $end) ? - [ $holds[($start-1)..($end-1)] ] : \@holds; + my ($self, $start, $end) = @_; + syslog('LOG_DEBUG', 'OILS: Patron->unavail_holds()'); + + my @holds_sip_output = map { + OpenILS::SIP::clean_text($self->__hold_to_title($_)) + } @{ + $self->{editor}->search_action_hold_request({ + usr => $self->{user}->id, + fulfillment_time => undef, + cancel_time => undef, + shelf_time => undef + }) + }; + + return (defined $start and defined $end) ? + [ @holds_sip_output[($start-1)..($end-1)] ] : + \@holds_sip_output; } sub block { -- 2.11.0