From: Bill Erickson Date: Tue, 4 Mar 2014 15:42:22 +0000 (-0500) Subject: LP#1284864 repair MR hold possibilty depth calculation X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c6750416e373ab76b42ed593131c33bed21a8b0c;p=evergreen%2Ftadl.git 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 --- 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 = ();