diff options
author | Dave Arter <davea@mysociety.org> | 2017-11-08 09:48:50 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2017-11-08 13:05:04 +0000 |
commit | 1b6dca6afd96f508f93f77216c2afb7e6f8945c7 (patch) | |
tree | 2ffdbe321dc5bd46ef95956db0845b1b4d0b13b4 | |
parent | 48f2f8035742c9807a91f2fd475a5c17a5aaa52a (diff) |
[Oxfordshire] Clearly mark RDI emails if sent from staging
Fixes mysociety/fixmystreetforcouncils#251
-rwxr-xr-x | bin/oxfordshire/send-rdi-emails | 8 | ||||
-rw-r--r-- | templates/email/oxfordshire/rdi.txt | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/bin/oxfordshire/send-rdi-emails b/bin/oxfordshire/send-rdi-emails index 801c1a889..9cc3e5502 100755 --- a/bin/oxfordshire/send-rdi-emails +++ b/bin/oxfordshire/send-rdi-emails @@ -40,6 +40,12 @@ foreach my $inspector (@inspectors) { user => $inspector, mark_as_processed => 1, }; + my $email_params = { + start_date => $start_date, + end_date => $end_date, + user => $inspector, + staging_site => FixMyStreet->config('STAGING_SITE'), + }; my $rdi = FixMyStreet::Integrations::ExorRDI->new($params); try { my $hdrs = { @@ -58,7 +64,7 @@ foreach my $inspector (@inspectors) { my $result = FixMyStreet::Email::send_cron( FixMyStreet::DB->schema, - "rdi.txt", $params, $hdrs, + "rdi.txt", $email_params, $hdrs, undef, 0, $cobrand, ); if ($result) { diff --git a/templates/email/oxfordshire/rdi.txt b/templates/email/oxfordshire/rdi.txt index f12467d68..9dcf24186 100644 --- a/templates/email/oxfordshire/rdi.txt +++ b/templates/email/oxfordshire/rdi.txt @@ -1,8 +1,11 @@ -Subject: RDI report for [% user.name %] +Subject:[% IF staging_site %] [STAGING][% END %] RDI report for [% user.name %] Please find attached RDI file for [% start_date %] to [% end_date %]. - +[% IF staging_site %] +NB: This RDI file was generated on a staging site and is for testing +purposes only. +[% END %] ---- The mySociety team and Oxfordshire County Council |