aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-11-30 13:30:51 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-11-30 13:30:51 +0000
commit99c5639c989b18e9b57c675ca435715d77cda879 (patch)
treec6a6f0f2e31e283192fd57390dc3b6cf5b18e68f
parentd3d3515093302349633c1fc58659045b86570def (diff)
Fix potential update issues with CSV export.
Only look at confirmed updates, and spot updates using mark_fixed and not problem_state (e.g. questionnaire responses).
-rw-r--r--perllib/FixMyStreet/App/Controller/Dashboard.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm
index 834d9c8d6..5f7e6a3e6 100644
--- a/perllib/FixMyStreet/App/Controller/Dashboard.pm
+++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm
@@ -344,9 +344,10 @@ 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 } ?
+ $hashref->{fixed_pp} //= $fixed_states->{ $problem_state } || $comment->mark_fixed ?
$c->cobrand->prettify_dt( $comment->created ): undef;
if ($closed_states->{ $problem_state }) {
$hashref->{closed_pp} = $c->cobrand->prettify_dt( $comment->created );