Bugzilla – Attachment 6700 Details for
Bug 6292
Overdue notices have a bug when multiple overdues exist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6292 : Followup 2. several letters where generated if a borrower had overdues with different due_date triggering the same level
Bug-6292--Followup-2-several-letters-where-generat.patch (text/plain), 2.54 KB, created by
Chris Cormack
on 2011-12-11 00:03:36 UTC
(
hide
)
Description:
Bug 6292 : Followup 2. several letters where generated if a borrower had overdues with different due_date triggering the same level
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-12-11 00:03:36 UTC
Size:
2.54 KB
patch
obsolete
>From 7d496b07205ddfc5d45a93f08b34a007f1fa3410 Mon Sep 17 00:00:00 2001 >From: Sophie Meynieux <sophie.meynieux@biblibre.com> >Date: Tue, 30 Aug 2011 16:54:42 +0200 >Subject: [PATCH] Bug 6292 : Followup 2. several letters where generated if a > borrower had overdues with different due_date triggering > the same level > >This patch fixes the SQL request giving the list of borrowers > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > misc/cronjobs/overdue_notices.pl | 10 +++++----- > 1 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 8abe0ae..6dad33d 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -426,7 +426,7 @@ END_SQL > # <date> <itemcount> <firstname> <lastname> <address1> <address2> <address3> <city> <postcode> > > my $borrower_sql = <<'END_SQL'; >-SELECT distinct(issues.borrowernumber), firstname, surname, address, address2, city, zipcode, country, email, date_due >+SELECT distinct(issues.borrowernumber), firstname, surname, address, address2, city, zipcode, country, email > FROM issues,borrowers,categories > WHERE issues.borrowernumber=borrowers.borrowernumber > AND borrowers.categorycode=categories.categorycode >@@ -442,10 +442,10 @@ END_SQL > } > $borrower_sql .= ' AND categories.overduenoticerequired=1 '; > if($triggered) { >- $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(date_due) = ?'; >+ $borrower_sql .= ' AND TO_DAYS(NOW())-TO_DAYS(date_due) = ?'; > push @borrower_parameters, $mindays; > } else { >- $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(date_due) BETWEEN ? and ? ' ; >+ $borrower_sql .= ' AND TO_DAYS(NOW())-TO_DAYS(date_due) BETWEEN ? and ? ' ; > push @borrower_parameters, $mindays, $maxdays; > } > >@@ -455,8 +455,8 @@ END_SQL > $verbose and warn $borrower_sql . "\n $branchcode | " . $overdue_rules->{'categorycode'} . "\n ($mindays, $maxdays)\nreturns " . $sth->rows . " rows"; > > while ( my ( $borrowernumber, $firstname, $lastname, >- $address1, $address2, $city, $postcode, $country, $email, >- $date_due ) = $sth->fetchrow ) >+ $address1, $address2, $city, $postcode, $country, $email >+ ) = $sth->fetchrow ) > { > $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has items triggering level $i."; > >-- >1.7.5.4
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 6292
:
4027
|
4028
|
4982
|
5000
|
5001
|
5221
| 6700