Hardcode for "new books" holds collab/dbwells/sample_available_status_code
authorDan Wells <dbw2@calvin.edu>
Wed, 15 Apr 2015 20:52:23 +0000 (16:52 -0400)
committerDan Wells <dbw2@calvin.edu>
Thu, 27 Aug 2015 18:36:10 +0000 (14:36 -0400)
We again hard coded '101' to make new books at least show up on the
pull list for capture.  I'm not sure how complete or necessary these
changes were, but this has worked for us so far.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm

index 3d592d6..76d52e8 100644 (file)
@@ -760,7 +760,7 @@ sub hold_pull_list {
     my $count = 1 if ($self->api_name =~/count$/o);
 
     my $status_filter = '';
-    $status_filter = 'AND a.status IN (0,7)' if ($self->api_name =~/status_filtered/o);
+    $status_filter = 'AND a.status IN (0,7,101)' if ($self->api_name =~/status_filtered/o);
 
     my $select = <<"    SQL";
         SELECT  h.*
@@ -1427,11 +1427,11 @@ sub new_hold_copy_targeter {
             # reset prox list after trimming good copies
             $prox_list = create_prox_list(
                 $self, $pu_lib,
-                [ grep { $_->status == 0 || $_->status == 7 } @good_copies ],
+                [ grep { $_->status == 0 || $_->status == 7 || $_->status == 101 } @good_copies ],
                 $hold, $hold_copy_map
             );
 
-            $all_copies = [ grep { ''.$_->circ_lib ne $pu_lib && ( $_->status == 0 || $_->status == 7 ) } @good_copies ];
+            $all_copies = [ grep { ''.$_->circ_lib ne $pu_lib && ( $_->status == 0 || $_->status == 7 || $_->status == 101 ) } @good_copies ];
 
             my $min_prox = [ sort keys %$prox_list ]->[0];
             my $best;
@@ -1809,7 +1809,7 @@ sub reservation_targeter {
                     next;
                 }
 
-                if ($copy->status->id == 0 || $copy->status->id == 7) {
+                if ($copy->status->id == 0 || $copy->status->id == 7 || $copy->status->id == 101) {
                     push @good_resources, $res;
                     next;
                 }