Hold current_shelf_lib for shelf browse API
authorBill Erickson <berick@esilibrary.com>
Tue, 27 Dec 2011 20:55:33 +0000 (15:55 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 4 Jan 2012 19:40:00 +0000 (14:40 -0500)
Use the new current_shelf_lib column on hold requests to determine which
copies are on a given shelf.  This also removes the shelf_time filter
since shelf_time is guaranteed to be set if current_shelf_lib is set.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm

index d35e13d..b69b7f5 100644 (file)
@@ -1945,14 +1945,11 @@ sub fetch_captured_holds {
                 capture_time     => { "!=" => undef },
                 current_copy     => { "!=" => undef },
                 fulfillment_time => undef,
-                pickup_lib       => $org,
-#                cancel_time      => undef,
-              }
+                current_shelf_lib => $org
+            }
         }
     };
     if($self->api_name =~ /expired/) {
-#       $query->{'where'}->{'+ahr'}->{'shelf_expire_time'} = {'<' => 'now'};
-        $query->{'where'}->{'+alhr'}->{'shelf_time'} = {'!=' => undef};
         $query->{'where'}->{'+alhr'}->{'-or'} = {
                 shelf_expire_time => { '<' => 'now'},
                 cancel_time => { '!=' => undef },