From d2ab48f47c1480c297b3fc99d609bcfe96de65ea Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 3 Dec 2019 19:55:19 +0000 Subject: [PATCH] Bug 24164: Copy the letter for each email To test: 1 - Set or have two patrons with emails - note thier borrowernumber for the report 2 - Create a report - note the report id ($REPORT_ID) SELECT borrowernumber, surname, firstname, email FROM borrowers WHERE borrowernumber IN (##,##); 3 - Create a notice in circulation with code TESTEMAIL 4 - The content should be "[% surname %]" 5 - perl misc/cronjobs/patron_emailer.pl --report $REPORT_ID --notice TESTEMAIL --module circulation --from anyone@anywhere.com --verbose 6 - Note that the emails both have the same surname 7 - Apply patch 8 - Repeat 5 9 - Emails now have correct content Signed-off-by: Kelly McElligott Signed-off-by: Jessica Zairo Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit bb110db48dee3a7eddcaea743e48e6da49d86e9c) Signed-off-by: Lucas Gass --- C4/Reports/Guided.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm index 705984d397..6f8f981341 100644 --- a/C4/Reports/Guided.pm +++ b/C4/Reports/Guided.pm @@ -1010,7 +1010,7 @@ sub EmailReport { $letter->{content} = $content; $email->{borrowernumber} = $row->{borrowernumber}; - $email->{letter} = $letter; + $email->{letter} = { %$letter }; $email->{from_address} = $from_address; $email->{to_address} = $to_address; -- 2.39.5