[open-ils-commits] [GIT] Evergreen ILS branch master updated. 3f7a75e6d0f5507db0b34bec09db9c00cd94d6aa

Evergreen Git git at git.evergreen-ils.org
Wed Feb 1 14:28:03 EST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  3f7a75e6d0f5507db0b34bec09db9c00cd94d6aa (commit)
      from  3391572ff63fab77b163b3567aaa04599ebe4430 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3f7a75e6d0f5507db0b34bec09db9c00cd94d6aa
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Mon Jan 30 17:15:44 2012 -0500

    Re-teach the clear shelf process "one copy"
    
    It got lost when fetching holds was abstracted out.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

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 17ae306..6808522 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -1956,6 +1956,7 @@ __PACKAGE__->register_method(
 		Returns a list of un-fulfilled holds (on the Holds Shelf) for a given title id
 		@param authtoken The login session key
 		@param org The org id of the location in question
+		@param match_copy A specific copy to limit to
 	/
 );
 
@@ -1968,6 +1969,7 @@ __PACKAGE__->register_method(
 		Returns list ids of un-fulfilled holds (on the Holds Shelf) for a given title id
 		@param authtoken The login session key
 		@param org The org id of the location in question
+		@param match_copy A specific copy to limit to
 	/
 );
 
@@ -1980,12 +1982,13 @@ __PACKAGE__->register_method(
 		Returns list ids of shelf-expired un-fulfilled holds for a given title id
 		@param authtoken The login session key
 		@param org The org id of the location in question
+		@param match_copy A specific copy to limit to
 	/
 );
 
 
 sub fetch_captured_holds {
-	my( $self, $conn, $auth, $org ) = @_;
+	my( $self, $conn, $auth, $org, $match_copy ) = @_;
 
 	my $e = new_editor(authtoken => $auth);
 	return $e->die_event unless $e->checkauth;
@@ -1993,6 +1996,9 @@ sub fetch_captured_holds {
 
 	$org ||= $e->requestor->ws_ou;
 
+	my $current_copy = { '!=' => undef };
+	$current_copy = { '=' => $match_copy } if $match_copy;
+
     my $query = { 
         select => { alhr => ['id'] },
         from   => {
@@ -2007,7 +2013,7 @@ sub fetch_captured_holds {
             '+acp' => { status => OILS_COPY_STATUS_ON_HOLDS_SHELF },
             '+alhr' => {
                 capture_time     => { "!=" => undef },
-                current_copy     => { "!=" => undef },
+                current_copy     => $current_copy,
                 fulfillment_time => undef,
                 current_shelf_lib => $org
             }
@@ -3352,9 +3358,6 @@ __PACKAGE__->register_method(
 sub clear_shelf_process {
 	my($self, $client, $auth, $org_id, $match_copy) = @_;
 
-    my $current_copy = { '!=' => undef };
-    $current_copy = { '=' => $match_copy } if $match_copy;
-
 	my $e = new_editor(authtoken=>$auth, xact => 1);
 	$e->checkauth or return $e->die_event;
 	my $cache = OpenSRF::Utils::Cache->new('global');
@@ -3366,7 +3369,7 @@ sub clear_shelf_process {
 
     my @hold_ids = $self->method_lookup(
         "open-ils.circ.captured_holds.id_list.expired_on_shelf.retrieve"
-    )->run($auth, $org_id);
+    )->run($auth, $org_id, $match_copy);
 
     my @holds;
     my @canceled_holds; # newly canceled holds

-----------------------------------------------------------------------

Summary of changes:
 .../perlmods/lib/OpenILS/Application/Circ/Holds.pm |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list