diff options
author | Dave Arter <davea@mysociety.org> | 2016-10-18 13:39:30 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2016-10-18 15:02:39 +0100 |
commit | c78d8884f86bbd4bf6c5230937ccb6d2b35d15b8 (patch) | |
tree | b5bad82a2212fd4543578fb64e1f073d9b955948 /bin | |
parent | 95806201712d53f76a94509f46a87ec76a0f7c98 (diff) |
[Zurich] Fix incorrect URLs in overdue alert emails
Links to view the reports on ZWN weren't being generated properly because
_email_report_list.txt was expecting 'data' to be in a particular format and
'cobrand' to be available.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/zurich/overdue-alert | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/zurich/overdue-alert b/bin/zurich/overdue-alert index 3b312c4db..90e31df1c 100755 --- a/bin/zurich/overdue-alert +++ b/bin/zurich/overdue-alert @@ -49,7 +49,8 @@ sub loop_through { my %to_send = (); while (my $row = $reports->next) { - $to_send{$row->bodies_str} .= '* ' . $row->id . ": '" . $row->title . "'\n\n"; + $to_send{$row->bodies_str} ||= []; + push @{$to_send{$row->bodies_str}}, $row; } foreach my $body_id (keys %to_send) { @@ -66,6 +67,7 @@ sub send_alert { my $h = { data => $data, admin_url => $cobrand->admin_base_url, + cobrand => $cobrand, }; my $to = [ [ $body_email, $body->name ] ]; |