Retarget Local Holds: Use part ID properly
authorThomas Berezansky <tsbere@mvlc.org>
Wed, 9 May 2012 12:42:58 +0000 (08:42 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 9 May 2012 20:19:43 +0000 (16:19 -0400)
Because the mapping ID is meaningless unless you only create one part at a
time, assign them only once in the order you created them, etc.

Which I think pretty much describes most of my original test cycle.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm

index 731131d..5bdb1c3 100644 (file)
@@ -2365,7 +2365,7 @@ sub checkin_retarget {
     # Check for parts on this copy
     my $parts = $self->editor->search_asset_copy_part_map({ target_copy => $self->copy->id });
     my %parts_hash = ();
-    %parts_hash = map {$_->id, 1} @$parts if @$parts;
+    %parts_hash = map {$_->part, 1} @$parts if @$parts;
 
     # Loop over holds in request-ish order
     # Stage 1: Get them into request-ish order