From 054587e0ca9ed966d99bd437a7992662db228e25 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 16 Dec 2014 17:15:58 +0000 Subject: [PATCH] BUG 13468: Overdue notice lists all checked out books This patch should fix the issue when running under 'triggered' mode To test: 1) Run overdue_notices.pl -t -n [to output notices to command line] 2) Note that the notices output, list ALL checked out items 3) Apply Patch 4) Run again 5) Note the difference Signed-off-by: Chris Cormack Signed-off-by: Jonathan Druart Amended patch: remove space changes. --- misc/cronjobs/overdue_notices.pl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 4e58e8a..4d05ff7 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -621,8 +621,17 @@ END_SQL } } else { - unless ($days_between >=$mindays && $days_between <= $maxdays){ - next; + if ($triggered) { + if ( $mindays != $days_between ) { + next; + } + } + else { + unless ( $days_between >= $mindays + && $days_between <= $maxdays ) + { + next; + } } } -- 2.1.0