From 6413eb9949956b899d4049bf53cb5a6dff15154f 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. Signed-off-by: Tomas Cohen Arazi --- 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 4e58e8a828..4d05ff71d6 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.39.5