From caeb993ff0b942b902f298442a8960f142d399e7 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 30 Mar 2015 11:19:55 -0400 Subject: [PATCH] LP#1438252 SIP honor floating copy checkin location Report the new value for a copy's circ_lib when it's a floating copy whose circ_lib is modified during checkin. This affects the AQ field of the SIP checkin (10) message. Signed-off-by: Bill Erickson Signed-off-by: Ben Shum --- .../lib/OpenILS/SIP/Transaction/Checkin.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/Checkin.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/Checkin.pm index ecafcc3cf0..c937892daa 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/Checkin.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/Checkin.pm @@ -168,6 +168,20 @@ sub do_checkin { $copy = $resp->{payload}->{copy} || ''; } + if ($copy) { + # Checkin of floating copies changes the circ lib. + # Update our SIP "item" to reflect the change. + + if ($copy->circ_lib != $self->item->{copy}->circ_lib->id) { + syslog('LOG_INFO', "OILS: updating copy circ lib after checkin"); + + $self->item->{copy}->circ_lib( + OpenILS::SIP->editor() + ->retrieve_actor_org_unit($copy->circ_lib) + ); + } + } + if ($self->item->hold) { my ($pickup_lib_id, $pickup_lib_sn); -- 2.43.2