diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-11-30 13:31:37 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-12-01 14:33:55 +0000 |
commit | 2dbf1d81c83fb64250828da8679a1d0557e8514c (patch) | |
tree | e968a06de99b8fe04904a505907cfa8abef5a19a | |
parent | 99c5639c989b18e9b57c675ca435715d77cda879 (diff) |
Stop using 'readable' dates in CSV export.
We want machine-readable dates in a data export.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Dashboard.pm | 18 |
2 files changed, 10 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 67f2da48d..e81c1644b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ - Council dashboard has date range for report generation #1885 - More JavaScript-enhanced `<select multiple>` elements #1589 - Council dashboard CSV export now has token based authentication #1911 + - And uses machine-readable dates. #1929 - Consolidate various admin summary statistics page. #1919. - UK: - Use SVG logo, inlined on front page. #1887 diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm index 5f7e6a3e6..5fe473c54 100644 --- a/perllib/FixMyStreet/App/Controller/Dashboard.pm +++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm @@ -346,11 +346,11 @@ sub export_as_csv { my $problem_state = $comment->problem_state or next; next unless $comment->state eq 'confirmed'; next if $problem_state eq 'confirmed'; - $hashref->{acknowledged_pp} //= $c->cobrand->prettify_dt( $comment->created ); - $hashref->{fixed_pp} //= $fixed_states->{ $problem_state } || $comment->mark_fixed ? - $c->cobrand->prettify_dt( $comment->created ): undef; + $hashref->{acknowledged} //= $comment->confirmed; + $hashref->{fixed} //= $fixed_states->{ $problem_state } || $comment->mark_fixed ? + $comment->confirmed : undef; if ($closed_states->{ $problem_state }) { - $hashref->{closed_pp} = $c->cobrand->prettify_dt( $comment->created ); + $hashref->{closed} = $comment->confirmed; last; } } @@ -369,11 +369,11 @@ sub export_as_csv { 'detail', 'user_name_display', 'category', - 'created_pp', - 'confirmed_pp', - 'acknowledged_pp', - 'fixed_pp', - 'closed_pp', + 'created', + 'confirmed', + 'acknowledged', + 'fixed', + 'closed', 'state', 'latitude', 'longitude', 'postcode', |