From 0a9d8bf111b80b649a67383939d970a258704b2f Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Fri, 15 May 2026 15:16:19 +0300 Subject: [PATCH] Bug 36762: Allow to ignore hold when creating a transfer When one tries to transfer an item that could fill a pending hold to a library that is not the holds pickup library, Koha gives only a option to transfer item to pickup library. This patch adds new option to ignore hold and transfer item to the library user selected in transfer tool. To test: 1. Log into Library A. 2. Find or create a biblio with 1 holdable item at Library A. 3. Place a hold for the biblio with pickup at Library B. 4. Navigate to Circulation > Transfers. 5. Attempt to transfer item to Library C. => Note that Koha only allows to transfer item to Library B, cancel hold and attempt transfer or return to the transfer tool. 6. Apply this patch. 7. Attempt to transfer item again. => Note that there is now an option to ignore the hold and transfer item to Library C. => When option to transfer item to the Library C is selected, confirm that Koha tells that transfer was made to Library C and a new transfer was made to database. Sponsored-by: Koha-Suomi Oy Signed-off-by: David Nind Signed-off-by: Andrew Fuerste Henry Signed-off-by: Lucas Gass --- circ/branchtransfers.pl | 4 ++++ .../prog/en/modules/circ/branchtransfers.tt | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index a0c02f7da1..5480ccd277 100755 --- a/circ/branchtransfers.pl +++ b/circ/branchtransfers.pl @@ -98,6 +98,10 @@ if ( $op eq "cud-KillWaiting" ) { $cancelled = 1; $reqmessage = 1; } # FIXME else? +} elsif ( $op eq "cud-IgnoreHold" ) { + $ignoreRs = 1; + $settransit = 1; + $op = 'cud-transfer'; } elsif ( $op eq "cud-SetTransit" ) { my $item = $query->param('itemnumber'); my $reserve_id = $query->param('reserve_id'); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt index 1e70acc588..e52bd99ec9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt @@ -138,6 +138,19 @@ + [% IF ( reserved && hold.branchcode != tobranchcd ) %] +
+
+ [% INCLUDE 'csrf-token.inc' %] + [% PROCESS transfer_hidden_fields %] + + + + +
+
+ [% END %] + [% IF ( reserved ) %]