Bugzilla – Attachment 163176 Details for
Bug 35997
Cancelling a hold should remove the hold from the queue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35997: Cancelling a hold should remove the hold from the queue
Bug-35997-Cancelling-a-hold-should-remove-the-hold.patch (text/plain), 1.79 KB, created by
Marcel de Rooy
on 2024-03-15 09:00:38 UTC
(
hide
)
Description:
Bug 35997: Cancelling a hold should remove the hold from the queue
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-03-15 09:00:38 UTC
Size:
1.79 KB
patch
obsolete
>From d4cd02fe02a86a70fe37df2757537bf615bac98a Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 5 Feb 2024 14:44:46 -0500 >Subject: [PATCH] Bug 35997: Cancelling a hold should remove the hold from the > queue >Content-Type: text/plain; charset=utf-8 > >Test plan: >1) Place a hold for a record for a patron >2) Build the holds queue >3) Note the holds queue contains a match for that patron and record >4) Cancel the holds queue >5) Reload the holds queue page, note the match for that patron and > record is gone! > >Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > Koha/Hold.pm | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > >diff --git a/Koha/Hold.pm b/Koha/Hold.pm >index 0224d019b7..a74ed95b58 100644 >--- a/Koha/Hold.pm >+++ b/Koha/Hold.pm >@@ -706,6 +706,21 @@ sub cancel { > $self->cancellation_reason( $params->{cancellation_reason} ); > $self->store(); > >+ my $dbh = $self->_result->result_source->schema->storage->dbh; >+ $dbh->do( >+ 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 = ? >+ }, undef, $self->id >+ ); >+ > if ( $params->{cancellation_reason} ) { > my $letter = C4::Letters::GetPreparedLetter( > module => 'reserves', >-- >2.30.2
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 35997
:
161766
|
161767
|
161794
|
162257
|
162258
|
163175
| 163176 |
163177