Bugzilla – Attachment 112642 Details for
Bug 24359
Remove items from Holds Queue when checked in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24359: Remove hold from holds queue when captured
Bug-24359-Remove-hold-from-holds-queue-when-captur.patch (text/plain), 1.83 KB, created by
Agustín Moyano
on 2020-10-28 14:05:12 UTC
(
hide
)
Description:
Bug 24359: Remove hold from holds queue when captured
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2020-10-28 14:05:12 UTC
Size:
1.83 KB
patch
obsolete
>From 42846ca47c427db341b0765db1175e27c3539977 Mon Sep 17 00:00:00 2001 >From: Agustin Moyano <agustinmoyano@theke.io> >Date: Wed, 28 Oct 2020 10:48:18 -0300 >Subject: [PATCH] Bug 24359: Remove hold from holds queue when captured > >This patch removes a hold from holds queue when captured by check in. > >To test: > >1. check out an item from a book with multiple items for patron_1 >2. place a biblio level hold for patron_2 >3. perl misc/cronjobs/holds/build_holds_queue.pl >CHECK => holds queue shows the placed hold >4. check in the item from step 1 and confirm hold for patron_2 >SUCCESS => hold for patron_2 is no longer in holds queue >5. prove t/db_dependent/HoldsQueue.t >--- > C4/Reserves.pm | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index d971324f1b..0b89a8deab 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1133,6 +1133,8 @@ if $transferToDo is not set, then the status is set to "Waiting" as well. > otherwise, a transfer is on the way, and the end of the transfer will > take care of the waiting status > >+This function also removes any entry of the hold in holds queue table. >+ > =cut > > sub ModReserveAffect { >@@ -1188,6 +1190,19 @@ sub ModReserveAffect { > CartToShelf( $itemnumber ); > } > >+ my $std = $dbh->prepare(q{ >+ DELETE q, t >+ FROM tmp_holdsqueue q >+ INNER JOIN hold_fill_targets t >+ ON q.borrowernumber = t.borrowernumber >+ AND q.biblionumber = t.biblionumber >+ AND q.itemnumber = t.itemnumber >+ AND q.item_level_request = t.item_level_request >+ AND q.holdingbranch = t.source_branchcode >+ WHERE t.reserve_id = ? >+ }); >+ $std->execute($hold->reserve_id); >+ > logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) ) > if C4::Context->preference('HoldsLog'); > >-- >2.25.0
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 24359
:
112641
|
112642
|
114405
|
114406
|
117462
|
117463
|
117464
|
117465
|
117466
|
117467