Bug 31391: (QA follow-up) Make sure pickup-library is kept when converting holds to recalls

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 <katrin.fischer@bsz-bw.de>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Katrin Fischer 2026-09-11 16:00:12 +00:00 committed by Pedro Amorim
parent e128051d09
commit 3df7914925
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 2 additions and 2 deletions

View File

@ -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',
}