LP#1331127 Repair sort logic of previous issuances user/berick/lp1331127-serial-prev-issue-location
authorBill Erickson <berick@esilibrary.com>
Tue, 17 Jun 2014 19:14:12 +0000 (15:14 -0400)
committerBill Erickson <berick@esilibrary.com>
Tue, 17 Jun 2014 19:14:12 +0000 (15:14 -0400)
commitcedb36047bf0bf2d53368843fbda178deeff0182
tree23bd32ce8479a2e3b996bd2209c6a0a7184b6815
parent65307dea427c4e006da6035699ee2201e9065cb0
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@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm