aboutsummaryrefslogtreecommitdiffstats
path: root/bin/update-all-reports
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-01-16 15:54:49 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-01-16 15:54:49 +0000
commitcc5a3c97e2d55b573bb44c05e1621dfa5b7c1ce3 (patch)
treeee9ae7aa7ccf932f472a2574f75b267333fc0b7a /bin/update-all-reports
parent5c1eaa797a7a07656f9ce7031a64d66165ebcc5e (diff)
Some tweaks to get Zurich Reports page working a bit better.
Diffstat (limited to 'bin/update-all-reports')
-rwxr-xr-xbin/update-all-reports4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/update-all-reports b/bin/update-all-reports
index 2ede68fe0..d0146dd47 100755
--- a/bin/update-all-reports
+++ b/bin/update-all-reports
@@ -59,9 +59,9 @@ while ( my @problem = $problems->next ) {
my $type = ( $problem{duration} > 2 * $fourweeks )
? 'unknown'
: ($problem{age} > $fourweeks ? 'older' : 'new');
- if (FixMyStreet::DB::Result::Problem->fixed_states()->{$problem{state}}) {
+ if (FixMyStreet::DB::Result::Problem->fixed_states()->{$problem{state}} || FixMyStreet::DB::Result::Problem->closed_states()->{$problem{state}}) {
# Fixed problems are either old or new
- $fixed{$body}{$duration_str}++ if FixMyStreet::DB::Result::Problem->fixed_states()->{$problem{state}};
+ $fixed{$body}{$duration_str}++;
} else {
# Open problems are either unknown, older, or new
$open{$body}{$type}++ if $problem{state} eq 'confirmed';