aboutsummaryrefslogtreecommitdiffstats
path: root/bin/send-reports
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-05-27 23:04:22 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-05-27 23:04:22 +0100
commit03359409fe8becfa44c08cbccb3ed0b5e8e6e5ef (patch)
tree275dafc3a15ae87a0728a3f74d28776e2475f33c /bin/send-reports
parentca393af1d89f6ff98e6b0f44d506c8621e3b74cc (diff)
Old test fixes for London reporting from master branch.
Diffstat (limited to 'bin/send-reports')
-rwxr-xr-xbin/send-reports23
1 files changed, 23 insertions, 0 deletions
diff --git a/bin/send-reports b/bin/send-reports
index 90a6553eb..d51276e9d 100755
--- a/bin/send-reports
+++ b/bin/send-reports
@@ -264,6 +264,7 @@ foreach my $row (@$unsent) {
$result *= post_easthants_message(%h);
}
} elsif ($send_web eq 'london') {
+ $h{message} = construct_london_message(%h);
if (!$nomail) {
$result *= post_london_report(%h);
}
@@ -363,6 +364,27 @@ sub post_easthants_message {
# London
+sub construct_london_message {
+ my %h = @_;
+ return <<EOF,
+A user of FixMyStreet has submitted the following report of a local
+problem that they believe might require your attention.
+
+Subject: $h{title}
+
+Details: $h{detail}
+
+$h{fuzzy}, or to provide an update on the problem, please visit the
+following link:
+
+$h{url}
+
+$h{closest_address}
+Yours,
+The FixMyStreet team
+EOF
+}
+
sub post_london_report {
my %h = @_;
my $phone = $h{phone};
@@ -385,6 +407,7 @@ sub post_london_report {
'Customer.Email' => $h{email},
'Customer.Phone' => $phone,
'Customer.Mobile' => $mobile,
+ 'ProblemDescription' => $h{message},
);
if ($h{used_map}) {
$params{'Location.Latitude'} = $h{latitude};