[open-ils-commits] [GIT] Evergreen ILS branch master updated. fceea3d2e12537ccb540a2a950a5ada22f73b7bf

Evergreen Git git at git.evergreen-ils.org
Tue Jun 25 09:40:08 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, master has been updated
       via  fceea3d2e12537ccb540a2a950a5ada22f73b7bf (commit)
      from  79eb7d97debfa8e4292f3f3170fe862ddd09f8ca (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 fceea3d2e12537ccb540a2a950a5ada22f73b7bf
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>

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 240e2ab..9c06c62 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