aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2017-09-04 17:47:46 +0100
committerStruan Donald <struan@exo.org.uk>2017-09-04 17:47:46 +0100
commit1391186c2fb56e46df5b124362e3facf6af173b5 (patch)
treecb88d4cc54b32ffbc6add3f06adbb7b89a559346 /perllib
parent4c0328bbe43b5cdf0ca9660505220d093a0cebe0 (diff)
include easting/northing in dashboard CSV export
Fixes mysociety/fixmystreetforcouncils#221
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/App/Controller/Dashboard.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm
index dbbd57623..867d0659b 100644
--- a/perllib/FixMyStreet/App/Controller/Dashboard.pm
+++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm
@@ -213,6 +213,8 @@ sub export_as_csv {
'Latitude', 'Longitude',
'Nearest Postcode',
'Ward',
+ 'Easting',
+ 'Northing',
'Report URL',
);
my @body = ($csv->string);
@@ -249,6 +251,8 @@ sub export_as_csv {
grep {$c->stash->{children}->{$_} }
split ',', $hashref->{areas};
+ my @local_coords = $report->local_coords;
+
$csv->combine(
@{$hashref}{
'id',
@@ -266,6 +270,8 @@ sub export_as_csv {
'postcode',
},
$wards,
+ $local_coords[0],
+ $local_coords[1],
(join '', $c->cobrand->base_url_for_report($report), $report->url),
);