Bugzilla – Attachment 32324 Details for
Bug 13035
Overdue notices send notices for due date in future.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13035: Overdue notices send notices for due date in future.
Bug-13035-Overdue-notices-send-notices-for-due-dat.patch (text/plain), 1.67 KB, created by
Chris Cormack
on 2014-10-14 15:06:33 UTC
(
hide
)
Description:
Bug 13035: Overdue notices send notices for due date in future.
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2014-10-14 15:06:33 UTC
Size:
1.67 KB
patch
obsolete
>From 6f808d97368c5f1ce9cc9415b58775299c514b84 Mon Sep 17 00:00:00 2001 >From: Rafal Kopaczka <rkk0@poczta.onet.pl> >Date: Tue, 7 Oct 2014 14:43:36 +0200 >Subject: [PATCH] Bug 13035: Overdue notices send notices for due date in > future. > >Overdue notices, script uses method days_between which returns always >positive value of days, no mater if due_date is higher or lower from >date_to_run. This causes overdue notices to be send for real overdue and >for checkouts with due date in future, which have same days_between as >in notice triggers. > >To reproduce: >1. Set up overdue notice triggers for eg. 2 day. >2. Checkout items for 2 borrowers first gets item with due date 2 days >in past and second gets 2 days in future. >3. run ./misc/cronjobs/overdue_notices.pl -n -t >4. watch that notices was generated for both of them. > >To test: >1. Repeat steps 1,2 >2. Apply patch >3. run ./misc/cronjobs/overdue_notices.pl -n -t >4. should be 1 notice for borrower with overdue item. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > misc/cronjobs/overdue_notices.pl | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 942cb6a..51ce072 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -510,6 +510,8 @@ END_SQL > my $borrowernumber; > while ( my $data = $sth->fetchrow_hashref ) { > >+ next unless ( DateTime->compare( $date_to_run, dt_from_string($data->{date_due})) ) == 1; >+ > # check the borrower has at least one item that matches > my $days_between; > if ( C4::Context->preference('OverdueNoticeCalendar') ) >-- >1.9.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 13035
:
32033
|
32324
|
32406