From 9b3abaf877711bd6af5691a2750ca711a038888d Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 8 Dec 2020 14:18:35 +0000 Subject: [PATCH] Bug 27166: [20.05.x] Set destination_loc to item->homebranch In bug 21020 we used the issue to fetch the item and then the homebranch. This fails when the item is not issued. We fetch the item already, so we can use it directly In 20.05.x we don't have the item object, so we can just use the SIP transaction item To test: 1 - Have an item belonging to branch A 2 - Check it in via sip at branch B: perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 --item CHESS1 -l FPL -m checkin 3 - The read command is blank and there is a warn about uninitialized data 4 - Apply patch 5 - Restart sip server 6 - Check the item in at branch A using the sip cli emulator 7 - Check it in at branch B 8 - This time the checkin should succeed and the output msg should be included Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Martin Renvoize Signed-off-by: Andrew Fuerste-Henry (cherry picked from commit d58beb621e967955766d42c81951ebb417838847) Signed-off-by: Victor Grousset/tuxayo --- C4/SIP/ILS/Transaction/Checkin.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/SIP/ILS/Transaction/Checkin.pm b/C4/SIP/ILS/Transaction/Checkin.pm index 01d76da008..ba1b35e3c0 100644 --- a/C4/SIP/ILS/Transaction/Checkin.pm +++ b/C4/SIP/ILS/Transaction/Checkin.pm @@ -109,7 +109,7 @@ sub do_checkin { $self->alert_type('04'); # send to other branch } if ($messages->{WasTransfered}) { # set into transit so tell unit - $self->{item}->destination_loc($issue->item->homebranch); + $self->{item}->destination_loc($self->{item}->{homebranch}); $self->alert_type('04'); # send to other branch } if ($messages->{ResFound}) { -- 2.39.5