From: Bill Erickson Date: Tue, 27 Dec 2011 21:20:08 +0000 (-0500) Subject: current_shelf_lib : ML misc open holds count X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e360225c1fc70a89a8dffa05e6295563492e6d5b;p=evergreen%2Fequinox.git current_shelf_lib : ML misc open holds count Signed-off-by: Bill Erickson --- 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 + ) }; }