[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch rel_2_5 updated. 7d78f966d0df16d5332075900698874d89263145

Evergreen Git git at git.evergreen-ils.org
Thu Sep 18 18:16:05 EDT 2014


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_5 has been updated
       via  7d78f966d0df16d5332075900698874d89263145 (commit)
      from  a436abf37a0ac3a8548d0f5f5820b8c04b9f8816 (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 7d78f966d0df16d5332075900698874d89263145
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Jun 17 15:14:12 2014 -0400

    LP#1331127 Repair sort logic of previous issuances
    
    Ensure that the list of previous issuances is sorted correctly (on
    date_published) when looking for the previous serial.unit to update its
    copy location (when serial.prev_issuance_copy_location is enabled).
    
    The data comes sorted from the DB, but the sorting was lost during the
    process of unique-ifying the list.  Ultimately, it was relying on the
    order of hash keys, which is undefined.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm
index 7d1ad2e..d742740 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm
@@ -1473,8 +1473,14 @@ sub _issuances_received {
         }
     }) or return $e->die_event;
 
-    my $uniq = +{map { $_->{"issuance"} => 1 } @$results};
-    return [ map { $e->retrieve_serial_issuance($_) } keys %$uniq ];
+    my %seen;
+    my $issuances = [];
+    for my $iss_id (map { $_->{"issuance"} } @$results) {
+        next if $seen{$iss_id};
+        $seen{$iss_id} = 1;
+        push(@$issuances, $e->retrieve_serial_issuance($iss_id));
+    }
+    return $issuances;
 }
 
 # _prepare_unit populates the detailed_contents, summary_contents, and

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

Summary of changes:
 .../src/perlmods/lib/OpenILS/Application/Serial.pm |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list