aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Dashboard.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-12-05 12:49:52 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-12-05 12:49:52 +0000
commitf838026f25f4b8ed6125707d7d2398554373da4b (patch)
tree1b687e3b79044c4ec3af0fa3b9af1415c88ca22d /perllib/FixMyStreet/App/Controller/Dashboard.pm
parentff1fec27a51aa8c2f8ff6c74cc0a97d4739ba8ed (diff)
parent2dbf1d81c83fb64250828da8679a1d0557e8514c (diff)
Merge branch 'issues/forcouncils/264-stop-csv-human-dates'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Dashboard.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Dashboard.pm19
1 files changed, 10 insertions, 9 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm
index 834d9c8d6..5fe473c54 100644
--- a/perllib/FixMyStreet/App/Controller/Dashboard.pm
+++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm
@@ -344,12 +344,13 @@ sub export_as_csv {
for my $comment ($report->comments) {
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 } ?
- $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;
}
}
@@ -368,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',