From f69d0f45149ecb5fee49d402df68d9a9f3689711 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 4 Dec 2019 18:50:41 +0000 Subject: [PATCH] Bug 24175: Use itemnumber when searching for holds in SIP drop_hold MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To test: 1 - place a hold for a patron 2 - Get SIP running https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup 3 - edit the sip_cli_emulator.pl for hold_mode from '+' to '-' 4 - Attempt to cancel hold 5 - It fails 6 - Apply patch 7 - Try again 8 - It succeeds Signed-off-by: Jonathan Druart Signed-off-by: Joonas Kylmälä Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson --- C4/SIP/ILS/Transaction/Hold.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/C4/SIP/ILS/Transaction/Hold.pm b/C4/SIP/ILS/Transaction/Hold.pm index 825e89b9db..44c1beb1bd 100644 --- a/C4/SIP/ILS/Transaction/Hold.pm +++ b/C4/SIP/ILS/Transaction/Hold.pm @@ -87,11 +87,10 @@ sub drop_hold { return $self; } my $item = Koha::Items->find({ barcode => $self->{item}->id }); - my $holds = Koha::Holds->search( { biblionumber => $item->biblionumber, - itemnumber => $self->{item}->id, + itemnumber => $item->itemnumber, borrowernumber => $patron->borrowernumber } ); -- 2.39.5