From 52a3018a75d87c24d4fe20245889430518b182f8 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 28 Oct 2020 19:00:28 +0000 Subject: [PATCH] Bug 26851: Don't generate a notice to library if no content To test: 1 - Check out an over due to a patron 2 - Set overdue triggers to a trigger less than number of days overdue 3 - Make sure the patron has no email 4 - Set content of ODUE notice to: [%# Comment will not print %] 5 - perl misc/cronjobs/overdue_notices.pl 6 - Check the message queue 7 - There is a notice sent to the library: "These messages were not sent directly to the patrons." With no messages 8 - Apply patch 9 - Repeat 10 - No new message generated Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart (cherry picked from commit 9769160083d614601997945f29a0fe9d353bf7ec) Signed-off-by: Fridolin Somers (cherry picked from commit e47ed528b2f952f582b088ab57b82fb4061eebf2) Signed-off-by: Andrew Fuerste-Henry --- misc/cronjobs/overdue_notices.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 4afaf34d1b..fbb3b0bbe6 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -706,7 +706,7 @@ END_SQL message_transport_type => $letter_exists ? $effective_mtt : $mtt, } ); - unless ($letter) { + unless ($letter && $letter->{content}) { $verbose and warn qq|Message '$overdue_rules->{"letter$i"}' content not found|; # this transport doesn't have a configured notice, so try another next; -- 2.39.5