Bugzilla – Attachment 122451 Details for
Bug 26282
Allow staff to decide if a hold cancellation notice will be sent when cancelling a hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26282: (QA follow-up) Allow notification via cancel_expired_holds
Bug-26282-QA-follow-up-Allow-notification-via-canc.patch (text/plain), 2.77 KB, created by
Kyle M Hall (khall)
on 2021-06-25 17:02:35 UTC
(
hide
)
Description:
Bug 26282: (QA follow-up) Allow notification via cancel_expired_holds
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-06-25 17:02:35 UTC
Size:
2.77 KB
patch
obsolete
>From f5cb754376e332e2f1c45942f11d779a3707f4fd Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 26 Nov 2020 13:19:32 +0000 >Subject: [PATCH] Bug 26282: (QA follow-up) Allow notification via > cancel_expired_holds > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > C4/Reserves.pm | 2 ++ > misc/cronjobs/holds/cancel_expired_holds.pl | 16 +++++++++++----- > 2 files changed, 13 insertions(+), 5 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 372b2d7eed..299bc99eab 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -938,6 +938,7 @@ Cancels all reserves with an expiration date from before today. > > sub CancelExpiredReserves { > my $cancellation_reason = shift; >+ my $notify = shift; > my $today = dt_from_string(); > my $cancel_on_holidays = C4::Context->preference('ExpireReservesOnHolidays'); > my $expireWaiting = C4::Context->preference('ExpireReservesMaxPickUpDelay'); >@@ -956,6 +957,7 @@ sub CancelExpiredReserves { > > my $cancel_params = {}; > $cancel_params->{cancellation_reason} = $cancellation_reason if defined($cancellation_reason); >+ $cancel_params->{notify_patron} = $notify if defined($notify); > if ( defined($hold->found) && $hold->found eq 'W' ) { > $cancel_params->{charge_cancel_fee} = 1; > } >diff --git a/misc/cronjobs/holds/cancel_expired_holds.pl b/misc/cronjobs/holds/cancel_expired_holds.pl >index 4932bbf346..4d1fba893d 100755 >--- a/misc/cronjobs/holds/cancel_expired_holds.pl >+++ b/misc/cronjobs/holds/cancel_expired_holds.pl >@@ -25,12 +25,12 @@ cancel_expired_holds.pl - cron script to cancel holds as they expire > =head1 SYNOPSIS > > ./cancel_expired_holds.pl >- ./cancel_expired_holds.pl --reason="EXPIRED" >+ ./cancel_expired_holds.pl --reason="EXPIRED" --notify > > or, in crontab: > > 0 1 * * * cancel_expired_holds.pl >- 0 1 * * * cancel_expired_holds.pl --reason="EXPIRED" >+ 0 1 * * * cancel_expired_holds.pl --reason="EXPIRED" --notify > > =head1 DESCRIPTION > >@@ -63,21 +63,27 @@ Print a brief help message and exits. > > =item B<--reason> > >-Optionally adds a reason for cancellation (which will trigger a notice to be sent to the patron) >+Optionally adds a reason for cancellation >+ >+=item B<--notify> >+ >+Optionally trigger a notice to be sent to the patron > > =back > > =cut > > my $help = 0; >+my $notify = 0; > my $reason; > > GetOptions( > 'help|?' => \$help, >- 'reason=s' => \$reason >+ 'notify' => \$notify, >+ 'reason=s' => \$reason, > ) or pod2usage(1); > pod2usage(1) if $help; > > cronlogaction(); > >-CancelExpiredReserves($reason); >+CancelExpiredReserves($reason, $notify); >-- >2.30.1 (Apple Git-130)
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 26282
:
109286
|
113960
|
113991
|
114007
|
114008
|
114009
|
114010
|
114011
|
114012
|
114013
|
114014
|
114015
|
114016
|
114028
|
114030
|
114031
|
114032
|
114033
|
114034
|
114035
|
114247
|
114248
|
114249
|
114250
|
114251
|
114252
|
114253
|
114254
|
114255
|
114259
|
115193
|
115194
|
115195
|
115196
|
115197
|
115198
|
115199
|
115200
|
115201
|
122448
|
122449
|
122450
|
122451
|
122452
|
122453
|
122454
|
122455
|
122456
|
122550
|
138407
|
138408
|
138409
|
138410
|
138411
|
138412
|
138413
|
138414
|
138415
|
138416
|
138417
|
138418
|
138419
|
138469
|
141210
|
171577
|
171578
|
171579
|
171580
|
171581
|
171582
|
171583
|
171584
|
171585
|
171586
|
171587
|
171588
|
171589
|
171590
|
171592
|
171593