aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/send-comments9
-rwxr-xr-xbin/update-all-reports4
2 files changed, 10 insertions, 3 deletions
diff --git a/bin/send-comments b/bin/send-comments
index d55f8dce4..232521447 100755
--- a/bin/send-comments
+++ b/bin/send-comments
@@ -64,13 +64,20 @@ while ( my $council = $councils->next ) {
$use_extended = 1;
}
- my $o = Open311->new(
+ my %open311_conf = (
endpoint => $council->endpoint,
jurisdiction => $council->jurisdiction,
api_key => $council->api_key,
use_extended_updates => $use_extended,
);
+
+ if ( $council->send_extended_statuses ) {
+ $open311_conf{extended_statuses} = 1;
+ }
+
+ my $o = Open311->new( %open311_conf );
+
if ( $council->area_id =~ /2482/ ) {
my $endpoints = $o->endpoints;
$endpoints->{update} = 'update.xml';
diff --git a/bin/update-all-reports b/bin/update-all-reports
index 4c4838c77..b8e47f2e7 100755
--- a/bin/update-all-reports
+++ b/bin/update-all-reports
@@ -52,9 +52,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{$council}{$duration_str}++ if FixMyStreet::DB::Result::Problem->fixed_states()->{$problem{state}};
+ $fixed{$council}{$duration_str}++;
} else {
# Open problems are either unknown, older, or new
$open{$council}{$type}++ if $problem{state} eq 'confirmed';