From 51687066a523dc5d66a87cc5302010c3cae34fe5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Radek=20=C5=A0iman?= Date: Fri, 13 Dec 2019 16:30:56 +0000 Subject: [PATCH] Bug 24235: DUEDGST not sent if PREDUDGST checkbox is off DUEDGST notice required PREDUEDGST to be on, but both messages have to be generated independently Test plan: 0) Do not apply the patch and reproduce the bug - turn OFF sms PREDUEDGST and turn ON sms DUEDGST for a given borrower - Sms version of DUEDGST is never generated into the message queue. 1) Apply the patch 2) Ensure that the bug is fixed Signed-off-by: Michal Denar Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit ddfb6727c0726007848947cd1fc6f75750e9fca7) Signed-off-by: Lucas Gass --- misc/cronjobs/advance_notices.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl index bc0d54390d..d8dcf73a51 100755 --- a/misc/cronjobs/advance_notices.pl +++ b/misc/cronjobs/advance_notices.pl @@ -375,6 +375,7 @@ if ($digest_per_branch) { sth => $sth_digest, digests => $digests, letter_code => 'PREDUEDGST', + message_name => 'advance_notice', branchcode => $branchcode, get_item_info => sub { my $params = shift; @@ -393,6 +394,7 @@ if ($digest_per_branch) { digests => $due_digest, letter_code => 'DUEDGST', branchcode => $branchcode, + message_name => 'item_due', get_item_info => sub { my $params = shift; $params->{sth}->execute($params->{borrowernumber}, 0); @@ -407,6 +409,7 @@ if ($digest_per_branch) { sth => $sth_digest, digests => $upcoming_digest, letter_code => 'PREDUEDGST', + message_name => 'advance_notice', get_item_info => sub { my $params = shift; $params->{sth}->execute($params->{borrowernumber}, @@ -421,6 +424,7 @@ if ($digest_per_branch) { sth => $sth_digest, digests => $due_digest, letter_code => 'DUEDGST', + message_name => 'item_due', get_item_info => sub { my $params = shift; $params->{sth}->execute($params->{borrowernumber}, 0); @@ -549,7 +553,7 @@ sub send_digests { C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $borrowernumber, - message_name => 'advance_notice' + message_name => $params->{message_name} } ); -- 2.39.5