Bug 40771

Summary: Wrong transfer breaking check in for holds when using library transfer limits
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, kyle
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 39750    
Bug Blocks:    

Description Nick Clemens (kidclamp) 2025-09-08 21:33:17 UTC
Bug 39750 fixed the case of a transfer with no hold - it seems the same problem can occur when the transfer is for a hold:


Line 178 of returns.pl
        my $hold = Koha::Holds->find($reserve_id);
        if ($diffBranchSend) {
            my $tobranch = $hold->pickup_library();

            # Add transfer, enqueue if one is already in the queue, and immediately set to in transit
            my $transfer = $item->request_transfer( { to => $tobranch, reason => 'Reserve', enqueue => 1 } );
            $transfer->transit;
        }