Bugzilla – Attachment 186592 Details for
Bug 34596
Items in transit should not show up in the holds queue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34596: Do not build holds queue when checkin reserve found but do if hold ignored
Bug-34596-Do-not-build-holds-queue-when-checkin-re.patch (text/plain), 5.25 KB, created by
Nick Clemens (kidclamp)
on 2025-09-18 20:23:29 UTC
(
hide
)
Description:
Bug 34596: Do not build holds queue when checkin reserve found but do if hold ignored
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-09-18 20:23:29 UTC
Size:
5.25 KB
patch
obsolete
>From f8c8048ddad0a9d4a34ee3d0a9153c06cc79a655 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 19 Nov 2024 19:57:54 +0000 >Subject: [PATCH] Bug 34596: Do not build holds queue when checkin reserve > found but do if hold ignored > >This patch does two things: >1: >It prevents rebulding the real time holds queue during a checkin if a reserve was found. >The reserve will either: >a - be set to waiting if at correct location and no confirmation - this is fine because we will rebuild the queue when > filling the hold >b - trigger a popup whihc will rebuild the queue when confirming the transfer, or be ignored > >2: >It adds a form to ignoring a hold so that we can rebuild the holds queue if we decided not to use the current item >to fill the found hold > >To test: >0 - Enable RealTimeHoldsQueue >1 - Place several holds for different libraries on a title >2 - Checkout a copy to a patron at current library (ignore current holds) >3 - Clean up DB so we can see outcomes from next steps: > delete from branchtransfers; delete from background_jobs; update reserves SET found=NULL where found='T'; >4 - Check in item, confirm hold >5 - Check background jobs, note two rebuilds of the holds queue >6 - Check item out to previous patron, repeat 3 >7 - Check in item, ignore the hold >8 - Check background jobs, note only one rebuild >9 - Apply patch, restart all >10 - Checkout item, repeat 3 >11 - Checkin item, confirm hold >12 - Check background jobs, onlt one rebuild of holds queue >13 - Checkout item, repeat 3 >14 - Checkin item, ignore hold >15 - Check background jobs, only one rebuild of holds queue > >Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> >--- > C4/Circulation.pm | 2 -- > circ/returns.pl | 8 ++++++++ > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 15 ++++++++++++++- > 3 files changed, 22 insertions(+), 3 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index cc36501f7f4..b6eef2534f1 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2824,8 +2824,6 @@ sub AddReturn { > } > ); > >- Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( { biblio_ids => [ $item->biblionumber ] } ) >- if C4::Context->preference('RealTimeHoldsQueue'); > } > > return ( $doreturn, $messages, $issue, ( $patron ? $patron->unblessed : {} ) ); >diff --git a/circ/returns.pl b/circ/returns.pl >index 29b2d2f7bf7..1009cee5774 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -257,6 +257,14 @@ if ( $op eq 'cud-dotransfer' ) { > $transfer->transit; > } > >+if ( $op eq 'cud-ignore_reserve' ) { >+ my $ignored_item = $query->param('ignoreitem'); >+ my $item = Koha::Items->find($ignored_item); >+ Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( { biblio_ids => [ $item->biblionumber ] } ) >+ if C4::Context->preference('RealTimeHoldsQueue'); >+ >+} >+ > if ( $transit && $op eq 'cud-transfer' ) { > my $transfer = Koha::Item::Transfers->find($transit); > if ($canceltransfer) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index fec7616ac69..c4f5637ba96 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -749,7 +749,20 @@ > > <input type="hidden" name="print_slip" value="0" /> > <button type="button" class="btn btn-default print" accesskey="P"> <i class="fa fa-print"></i> Print slip and confirm (P) </button> >- <button data-bs-dismiss="modal" type="submit" class="btn btn-default ignore" accesskey="I"> <i class="fa fa-times"></i> Ignore (I) </button> >+ <form method="post" action="returns.pl" class="confirm"> >+ <input type="hidden" name="op" value="cud-ignore_reserve" /> >+ <input type="hidden" name="ignoreitem" value="[% itemnumber | html %]" /> >+ [% INCLUDE 'csrf-token.inc' %] >+ [% FOREACH inputloo IN inputloop %] >+ <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" /> >+ <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" /> >+ <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" /> >+ <input type="hidden" name="nr-[% inputloo.counter | html %]" value="[% inputloo.not_returned | html %]" /> >+ [% END %] >+ <button type="submit" data-bs-dismiss="modal" class="btn btn-default deny" accesskey="i"> >+ <i class="fa fa-times"></i> Ignore (I) >+ </button> >+ </form> > > <fieldset class="action"> > [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34596
:
174811
|
175804
|
186592
|
186593
|
186594
|
186595
|
186596
|
186597