[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. d1258da72f97f1a46cc85e3ff0b88c74d0f797f6

Evergreen Git git at git.evergreen-ils.org
Thu Dec 12 16:43:15 EST 2013


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  d1258da72f97f1a46cc85e3ff0b88c74d0f797f6 (commit)
      from  46768f14f6a87833ad38ecdf80f37589abe687c3 (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 d1258da72f97f1a46cc85e3ff0b88c74d0f797f6
Author: Steven Chan <schan at sitka.bclibraries.ca>
Date:   Wed May 15 14:30:15 2013 -0700

    Fix LP1180140, View Holds not working for a serial with subscription and no issuances
    
    A request is made to
    open-ils.circ.holds.retrieve_all_from_title,
    which is the function Circ/Holds.pm/all_rec_holds().
    
    In the function, when checking for issuance holds, there is a missing @
    to dereference the list of issuance IDs, so that the ahr table is search
    with badly formed input, which results in returning an undefined list
    instead of an empty list.  The error will occur for any record with a
    serial.subscription entry but with no related entries in
    serial.issuance.
    
    We also recode the initialization of the response object in order to
    clarify its expected structure, a hash of array references.
    
    Signed-off-by: Steven Chan <schan at sitka.bclibraries.ca>
    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 9de0fca..8ba48ab 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -3188,7 +3188,16 @@ sub all_rec_holds {
     $args->{fulfillment_time} = undef; #  we don't want to see old fulfilled holds
     $args->{cancel_time} = undef;
 
-    my $resp = { volume_holds => [], copy_holds => [], recall_holds => [], force_holds => [], metarecord_holds => [], part_holds => [], issuance_holds => [] };
+    my $resp = {
+          metarecord_holds => []
+        , title_holds      => []
+        , volume_holds     => []
+        , copy_holds       => []
+        , recall_holds     => []
+        , force_holds      => []
+        , part_holds       => []
+        , issuance_holds   => []
+    };
 
     my $mr_map = $e->search_metabib_metarecord_source_map({source => $title_id})->[0];
     if($mr_map) {
@@ -3229,7 +3238,7 @@ sub all_rec_holds {
             {subscription => $subs}, {idlist=>1}
         );
 
-        if ($issuances) {
+        if (@$issuances) {
             $resp->{issuance_holds} = $e->search_action_hold_request(
                 {
                     hold_type => OILS_HOLD_TYPE_ISSUANCE,

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

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


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list