From c6750416e373ab76b42ed593131c33bed21a8b0c Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 4 Mar 2014 10:42:22 -0500 Subject: [PATCH] LP#1284864 repair MR hold possibilty depth calculation Fixes a bug where the hold possibility checks for metarecords used the depth of the selection OU instead of depth 0 when no depth was defined. This prevented holds from being placed in some instances, particularly when no hold boundaries were defined (or equaled zero). Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm index 3bf21573e6..45b213346f 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -2477,6 +2477,9 @@ sub do_possibility_checks { } elsif( $hold_type eq OILS_HOLD_TYPE_METARECORD ) { + # pasing undef as the depth to filtered_records causes the depth + # of the selection_ou to be used, which is not what we want here. + $depth ||= 0; my ($recs) = __PACKAGE__->method_lookup('open-ils.circ.holds.metarecord.filtered_records')->run($mrid, $holdable_formats, $selection_ou, $depth); my @status = (); -- 2.43.2