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 <kelly@bywatersolutions.com>
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
This commit is contained in:
Nick Clemens 2019-12-03 19:55:19 +00:00 committed by Joy Nelson
parent 17eabbf4bf
commit bb110db48d
1 changed files with 1 additions and 1 deletions

View File

@ -1029,7 +1029,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;