[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. 0f077d46f7d01d3e9d9242bbbdd261f4cf8a8666

Evergreen Git git at git.evergreen-ils.org
Wed May 9 12:00:29 EDT 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, rel_2_2 has been updated
       via  0f077d46f7d01d3e9d9242bbbdd261f4cf8a8666 (commit)
      from  d75dd05fa05cac8d7f0133ba77c40bf4282a9bbf (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 0f077d46f7d01d3e9d9242bbbdd261f4cf8a8666
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Mon May 7 15:42:35 2012 -0400

    Fix hold has copy at lookup
    
    Filter on available or reshelving, and add more hold type support for lookup
    purposes (parts and issuance holds).
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous 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 70325f9..906ec53 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -3540,7 +3540,7 @@ sub hold_has_copy_at {
                 ccs  => {field => 'id', filter => { holdable => 't'}, fkey => 'status'  }
             }
         },
-        where => {'+acp' => { circulate => 't', deleted => 'f', holdable => 't', circ_lib => $org_unit}},
+        where => {'+acp' => { circulate => 't', deleted => 'f', holdable => 't', circ_lib => $org_unit, status => [0,7]}},
         limit => 1
     };
 
@@ -3551,7 +3551,23 @@ sub hold_has_copy_at {
     } elsif($hold_type eq 'V') {
 
         $query->{where}->{'+acp'}->{call_number} = $hold_target;
-    
+
+    } elsif($hold_type eq 'P') {
+
+        $query->{from}->{acp}->{acpm} = {
+            field  => 'target_copy',
+            fkey   => 'id',
+            filter => {part => $hold_target},
+        };
+
+    } elsif($hold_type eq 'I') {
+
+        $query->{from}->{acp}->{sitem} = {
+            field  => 'unit',
+            fkey   => 'id',
+            filter => {issuance => $hold_target},
+        };
+
     } elsif($hold_type eq 'T') {
 
         $query->{from}->{acp}->{acn} = {

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

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


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list