From 7b31a3582403ab56de1e1a133bf7d9c79d85c7c3 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 15 Mar 2021 15:42:49 +0000 Subject: [PATCH] Bug 24295: Remove GetTransfer from Z3950Responder MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Replace the GetTrasfer call in Z3950Responder/Session.pm with a call to the Koha::Item method 'get_transfer'. Test plan 1/ Configure your system to use the Z3950 responder 2/ Trigger an item transfer for an item 3/ Search for the item via Z3950 and varify the transfer status is set 4/ Apply the patch 5/ Repeat step 3 Rebased-by: Joonas Kylmälä Signed-off-by: Joonas Kylmälä Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- Koha/Z3950Responder/Session.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Koha/Z3950Responder/Session.pm b/Koha/Z3950Responder/Session.pm index 6f663b5f95..f84bcba77b 100644 --- a/Koha/Z3950Responder/Session.pm +++ b/Koha/Z3950Responder/Session.pm @@ -19,7 +19,6 @@ package Koha::Z3950Responder::Session; use Modern::Perl; -use C4::Circulation qw( GetTransfers ); use C4::Context; use C4::Reserves qw( GetReserveStatus ); use C4::Search qw( new_record_from_zebra ); @@ -286,8 +285,8 @@ sub add_item_status { push @statuses, $status_strings->{WITHDRAWN}; } - if ( scalar( GetTransfers( $itemnumber ) ) ) { - push @statuses, $status_strings->{IN_TRANSIT}; + if ( my $transfer = $item->get_transfer ) { + push @statuses, $status_strings->{IN_TRANSIT} if $transfer->in_transit; } if ( GetReserveStatus( $itemnumber ) ne '' ) { -- 2.39.5