Bugzilla – Attachment 137588 Details for
Bug 22456
Allow patrons to cancel their waiting holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22456: (follow-up) Cancel holds at checkin
Bug-22456-follow-up-Cancel-holds-at-checkin.patch (text/plain), 1.53 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-07-11 20:41:04 UTC
(
hide
)
Description:
Bug 22456: (follow-up) Cancel holds at checkin
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-07-11 20:41:04 UTC
Size:
1.53 KB
patch
obsolete
>From a8c6d86c1270737e64069d08ee6bb021e920e4aa Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 27 May 2022 10:38:29 -0300 >Subject: [PATCH] Bug 22456: (follow-up) Cancel holds at checkin > >This patch makes checkin process the cancellation requested holds >actually cancel them before moving forward. > >To test: >1. Have a waiting hold with a patron generated cancellation request >2. At circulation, check the item in >=> SUCCESS: The workflow follows as if the cancellation requested hold >was already cancelled >=> SUCCESS: The hold is actually cancelled >=> SUCCESS: Not shown in the OPAC anymore > >Sponsored-by: Montgomery County Public Libraries > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > circ/returns.pl | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/circ/returns.pl b/circ/returns.pl >index 340efb4779..ecee8048a2 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -338,6 +338,16 @@ if ($barcode) { > $template->param( 'multiple_confirmed' => 1 ) > if $query->param('multiple_confirm'); > >+ # is there a waiting hold for the item, for which cancellation >+ # has been requested? >+ my $waiting_holds_to_be_cancelled = >+ Koha::Holds->waiting->search( { itemnumber => $item->id } ) >+ ->filter_by_has_cancellation_requests; >+ >+ while ( my $hold = $waiting_holds_to_be_cancelled->next ) { >+ $hold->cancel; >+ } >+ > # do the return > ( $returned, $messages, $issue, $borrower ) = > AddReturn( $barcode, $userenv_branch, $exemptfine, $return_date ) >-- >2.34.1
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 22456
:
135165
|
135166
|
135167
|
135168
|
135169
|
135170
|
135171
|
135319
|
135320
|
135321
|
135322
|
135323
|
135324
|
135325
|
135326
|
135349
|
135350
|
135351
|
135352
|
135396
|
135397
|
135398
|
135399
|
135400
|
135401
|
135402
|
135403
|
135404
|
135405
|
135406
|
135407
|
135408
|
135409
|
135410
|
135411
|
135430
|
135830
|
135831
|
135832
|
135838
|
135839
|
135840
|
135841
|
135842
|
135843
|
135844
|
135845
|
135846
|
137580
|
137581
|
137582
|
137583
|
137584
|
137585
|
137586
|
137587
|
137588
|
137589
|
137591
|
138209
|
138210
|
138211
|
138212
|
138213
|
138214
|
138215
|
138216
|
138217
|
138218