Bugzilla – Attachment 181999 Details for
Bug 39820
Items with hold cancellation requests should have the hold cancelled when checked in via SIP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39820: Cancel holds with cancellation requests via SIP
Bug-39820-Cancel-holds-with-cancellation-requests-.patch (text/plain), 1.45 KB, created by
Lucas Gass (lukeg)
on 2025-05-06 21:23:36 UTC
(
hide
)
Description:
Bug 39820: Cancel holds with cancellation requests via SIP
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-05-06 21:23:36 UTC
Size:
1.45 KB
patch
obsolete
>From d5beec085c5a940dd679c608bc06b01d5433aaa5 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 6 May 2025 21:22:20 +0000 >Subject: [PATCH] Bug 39820: Cancel holds with cancellation requests via SIP > >To test: >1. In circ rules set a Default waiting hold cancellation policy to allow hold cancellation requests. >2. Add a hold for a patron and create a hold cancellation request. >3. Check the item in via SIP, I used the SIP emulator: > >kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l MPL -su term1 -sp term1 -m checkin --patron 23529000035676 --item 39999000001310 > >4. The hold remains. >5. APPLY PATCH, restart_all >6. Try 2 - 4 again, the hold should be cancelled >--- > C4/SIP/ILS/Transaction/Checkin.pm | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/C4/SIP/ILS/Transaction/Checkin.pm b/C4/SIP/ILS/Transaction/Checkin.pm >index f222401e4e7..516e141d576 100644 >--- a/C4/SIP/ILS/Transaction/Checkin.pm >+++ b/C4/SIP/ILS/Transaction/Checkin.pm >@@ -91,6 +91,12 @@ sub do_checkin { > my ( $return, $messages, $issue, $borrower ); > > my $item = Koha::Items->find( { barcode => $barcode } ); >+ if ($item) { >+ my $waiting_holds_to_be_cancelled = $item->holds->waiting->filter_by_has_cancellation_requests; >+ while ( my $hold = $waiting_holds_to_be_cancelled->next ) { >+ $hold->cancel; >+ } >+ } > > my $human_required = 0; > if ( C4::Context->preference("CircConfirmItemParts") >-- >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 39820
:
181999
|
182105
|
182276
|
182277