[open-ils-commits] [GIT] Evergreen ILS branch rel_2_4 updated. 00e8da7dc45793f9664e7808d95e3be569b1eda4

Evergreen Git git at git.evergreen-ils.org
Tue Jun 25 09:42:56 EDT 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, rel_2_4 has been updated
       via  00e8da7dc45793f9664e7808d95e3be569b1eda4 (commit)
      from  52f893edbec7b71a2e9c40afb1cd5a7c2cc1cc9b (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 00e8da7dc45793f9664e7808d95e3be569b1eda4
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Jun 25 07:44:22 2013 -0400

    Only attempt to map copies once per hold
    
    The development of Calculated Proximity Adjustment (CPA) for 2.4 added a "prox"
    column to action.hold_copy_map (ahcm) to store on variant of copy proximity.  That
    value is calculated at the same time that certain other data structures are
    set up, and is conceptually tied to them, so the resulting combined data
    set is used to insert values into the ahcm.  However, user configuration
    can cause that data set to contain non-unique values, where the data structure
    used previous to CPA was guaranteed to be unique.  This lack of uniqueness
    would then violate a constraint on the achm table.  This commit restores the
    required uniqueness for the purpose of creating the ahcm rows.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    
    Conflicts (whitespace only):
    	Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
index 8e601ca..064a4c8 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
@@ -1542,7 +1542,8 @@ sub new_hold_copy_targeter {
 			my $prox_list = create_prox_list( $self, $pu_lib, $all_copies, $hold );
 			$log->debug( "\tMapping ".scalar(@$all_copies)." potential copies for hold ".$hold->id);
 			for my $prox ( keys %$prox_list ) {
-				action::hold_copy_map->create( { proximity => $prox, hold => $hold->id, target_copy => $_->id } ) for (@{$$prox_list{$prox}});
+				action::hold_copy_map->create( { proximity => $prox, hold => $hold->id, target_copy => $_ } )
+					for keys( %{{ map { $_->id => 1 } @{$$prox_list{$prox}} }} );
 			}
 
 			#$client->status( new OpenSRF::DomainObject::oilsContinueStatus );

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

Summary of changes:
 .../Application/Storage/Publisher/action.pm        |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list