Clear-shelf includes pickup-lib changes : Perl repairs
authorBill Erickson <berick@esilibrary.com>
Wed, 22 Aug 2012 14:43:53 +0000 (10:43 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 22 Aug 2012 14:43:53 +0000 (10:43 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm

index 5b523e8..f58dabc 100644 (file)
@@ -3449,21 +3449,21 @@ sub clear_shelf_process {
 
     if ($e->commit) {
 
-
-
         my %cache_data = (
             hold => [],
             transit => [],
             shelf => [],
-
-            # if requested, find any holds on our shelf whose pickup lib
-            # has been changed to some other branch and include those in
-            # the clear-shelf cache.  But, only add them to the pl_changed 
-            # list if they are not otherwise getting canceled by this process.
-            pl_changed => 1 ? # TODO ORG SETTING
-                pickup_lib_changed_on_shelf_holds($e, $org_id, \@hold_ids) : []
+            pl_changed => []
         );
 
+        # if requested, find any holds on our shelf whose pickup lib
+        # has been changed to some other branch and include those in
+        # the clear-shelf cache.  But, only add them to the pl_changed 
+        # list if they are not otherwise getting canceled by this process.
+        $cache_data{pl_changed} = 
+            pickup_lib_changed_on_shelf_holds($e, $org_id, \@hold_ids)
+            if $U->ou_ancestor_setting_value($org_id, 'circ.holds.clear_shelf.include_pl_changed');
+
         for my $hold (@holds) {
 
             my $copy = $hold->current_copy;