From e360225c1fc70a89a8dffa05e6295563492e6d5b Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 27 Dec 2011 16:20:08 -0500 Subject: [PATCH] current_shelf_lib : ML misc open holds count Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm index c54debf431..93f1a75274 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm @@ -1840,7 +1840,7 @@ sub hold_request_count { } my $holds = $e->json_query({ - select => {ahr => ['shelf_time']}, + select => {ahr => ['pickup_lib', 'current_shelf_lib']}, from => 'ahr', where => { usr => $user_id, @@ -1851,7 +1851,12 @@ sub hold_request_count { return { total => scalar(@$holds), - ready => scalar(grep { $_->{shelf_time} } @$holds) + ready => scalar( + grep { + $_->{current_shelf_lib} and # avoid undef warnings + $_->{pickup_lib} eq $_->{current_shelf_lib} + } @$holds + ) }; } -- 2.11.0