From 3df791492577c138213ec02a89facb32bebb4ab1 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Fri, 11 Sep 2026 16:00:12 +0000 Subject: [PATCH] Bug 31391: (QA follow-up) Make sure pickup-library is kept when converting holds to recalls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code was using the patron's home library instead of passing the pickup-location of the original hold. This is a simple variable change in 2 places for record level and item level holds. A) Set 'UseRecalls' to 'staff' at http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=UseRecalls B) At http://localhost:8081/cgi-bin/koha/admin/smart-rules.pl set the default rule: 'Recalls allowed' = 5, 'Recalls per record' = 3, 'On shelf recalls allowed' = 'if any unavailable' (not 'all'). C) Use biblionumber '437' (has just one item, barcode '39999000019186'), check that item out to 'Henry Acevedo' (Patron A). D) Place a record-level hold on it for 'Johnny Bryan' (Patron B), who's from 'Midway' — but set the hold's pickup location to 'Centerville' instead. E) On http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=437, tick the hold, click 'Convert selected to recall', confirm. F) Check the new recall's pickup location on http://localhost:8081/cgi-bin/koha/recalls/request.pl?biblionumber=437 - Expected: 'Centerville' - Without the patch applied, it will be the patron's home library: Midway - With the patch applied, the pickup-location of the hold is kept: Centerville. G) Cancel the recall. H) Repeat the test plan, but in step D) place an item level hold instead of a record level hold. Signed-off-by: Katrin Fischer Signed-off-by: Pedro Amorim --- C4/Reserves.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 6b26f7f213..4cf8eb5652 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -1257,7 +1257,7 @@ sub ModReserve { { patron => $patron, biblio => $biblio, - branchcode => $branchcode, + branchcode => $hold->branchcode, expirationdate => $date, interface => 'intranet', item => $hold->item, @@ -1271,7 +1271,7 @@ sub ModReserve { { patron => $patron, biblio => $biblio, - branchcode => $branchcode, + branchcode => $hold->branchcode, expirationdate => $date, interface => 'intranet', }