[Koha-bugs] [Bug 12529] Overdue notices do not respect holidays
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Feb 6 10:30:06 CET 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12529
--- Comment #15 from Jonathan Druart <jonathan.druart at biblibre.com> ---
I am under the impression there is a big issue introduced by this patch,
MariaDB [koha]> select itemnumber,date_due from issues where
borrowernumber=8408;
+------------+---------------------+
| itemnumber | date_due |
+------------+---------------------+
| 27127 | 2015-03-03 23:59:00 |
| 27143 | 2015-01-01 14:31:00 |
| 27754 | 2014-12-22 14:31:00 |
+------------+---------------------+
Overdue rules are 1:7, 2:15, 3:21
On master, the following diff
diff --git a/misc/cronjobs/overdue_notices.pl
b/misc/cronjobs/overdue_notices.pl
index 4d05ff7..d4dd153 100755
--- a/misc/cronjobs/overdue_notices.pl
+++ b/misc/cronjobs/overdue_notices.pl
@@ -627,6 +627,9 @@ END_SQL
}
}
else {
+ if ( $borrowernumber == 8408 ) {
+ warn "$item_info->{itemnumber} : $days_between
>= $mindays && $days_between <= $maxdays";
+ }
unless ( $days_between >= $mindays
&& $days_between <= $maxdays )
{
output:
27127 : 25 >= 21 && 25 <= 90 at misc/cronjobs/overdue_notices.pl line 631.
27143 : 36 >= 21 && 36 <= 90 at misc/cronjobs/overdue_notices.pl line 631.
27754 : 46 >= 21 && 46 <= 90 at misc/cronjobs/overdue_notices.pl line 631.
The itemnumber 27127 should not be embedded in the notice (it is).
The problem comes from the $MAX=90 and the $date_between.
Note that I launched the script without the -t option, but I am pretty sure
some cases can cause problem even with -t
Don't have the time to investigate more.
Could someone confirm?
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list