aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/oxfordshire/send-rdi-emails8
-rw-r--r--templates/email/oxfordshire/rdi.txt7
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