Bugzilla – Attachment 140461 Details for
Bug 31540
Holds reminder cronjob should consider expiration date of holds, and not send notices if hold expired
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31540: Exclude expired holds from the reminder job
Bug-31540-Exclude-expired-holds-from-the-reminder-.patch (text/plain), 1.45 KB, created by
Nick Clemens (kidclamp)
on 2022-09-12 14:39:12 UTC
(
hide
)
Description:
Bug 31540: Exclude expired holds from the reminder job
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-09-12 14:39:12 UTC
Size:
1.45 KB
patch
obsolete
>From f4ec4601decf2be805cc292a35ad12329e63238c Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 12 Sep 2022 14:35:24 +0000 >Subject: [PATCH] Bug 31540: Exclude expired holds from the reminder job > >Some libraries don't want to auto-cancel holds, but we should not remind >a patron about a hold which has expired. > >To test: >1 - Place a hold for a patron >2 - Set it waiting >3 - Run the holds reminder script in the future > perl misc/cronjobs/holds/holds_reminder.pl -day 1 --date '2023-09-12' -v >4 - Note the holds would be reminded >5 - Set expirationdate for the hold less than today > UPDATE reserves SET expirationdate = DATE_SUB(CURDATE(), INTERVAL 1 DAY); >6 - Run the remidner cron again >7 - No holds trigger! >--- > misc/cronjobs/holds/holds_reminder.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/misc/cronjobs/holds/holds_reminder.pl b/misc/cronjobs/holds/holds_reminder.pl >index d1f49287ca..96290c00ad 100755 >--- a/misc/cronjobs/holds/holds_reminder.pl >+++ b/misc/cronjobs/holds/holds_reminder.pl >@@ -260,6 +260,7 @@ foreach my $branchcode (@branchcodes) { #BEGIN BRANCH LOOP > my $reserves = Koha::Holds->search({ > waitingdate => {$comparator => $waiting_since }, > 'me.branchcode' => $branchcode, >+ '-or' => [ expirationdate => undef, expirationdate => { '>' => \'CURDATE()' } ] > },{ prefetch => 'patron' }); > > $verbose and warn "No reserves found for $branchcode\n" unless $reserves->count; >-- >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 31540
:
140461
|
140605
|
141014