diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-10-08 15:28:11 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-10-08 15:28:11 +0100 |
commit | 2c24318939d310100559b0bc8aed663ff940ce22 (patch) | |
tree | dde559ef21d1e1bd9eea2cf69596171c2010a6c9 | |
parent | 7f7431377721bc64c3816e5af4f54bdd5f6cd064 (diff) |
[Open311] Add ability to send reopen status.
Switch on for Buckinghamshire.
-rwxr-xr-x | bin/send-comments | 5 | ||||
-rw-r--r-- | perllib/Open311.pm | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/bin/send-comments b/bin/send-comments index 55c9da62b..33da7379e 100755 --- a/bin/send-comments +++ b/bin/send-comments @@ -32,6 +32,7 @@ use constant SEND_METHOD_OPEN311 => 'Open311'; use constant COUNCIL_ID_OXFORDSHIRE => 2237; use constant COUNCIL_ID_BROMLEY => 2482; use constant COUNCIL_ID_LEWISHAM => 2492; +use constant COUNCIL_ID_BUCKS => 2217; # Set up site, language etc. my ($verbose, $nomail) = CronFns::options(); @@ -84,6 +85,10 @@ while ( my $body = $bodies->next ) { $open311_conf{use_customer_reference} = 1, } + if ( $body->areas->{+COUNCIL_ID_BUCKS} ) { + $open311_conf{mark_reopen} = 1; + } + if ( $body->send_extended_statuses ) { $open311_conf{extended_statuses} = 1; } diff --git a/perllib/Open311.pm b/perllib/Open311.pm index 7c12ee3a1..6c6ec59cc 100644 --- a/perllib/Open311.pm +++ b/perllib/Open311.pm @@ -34,6 +34,7 @@ has extended_statuses => ( is => 'ro', isa => Bool, default => 0 ); has always_send_email => ( is => 'ro', isa => Bool, default => 0 ); has multi_photos => ( is => 'ro', isa => Bool, default => 0 ); has use_customer_reference => ( is => 'ro', isa => Bool, default => 0 ); +has mark_reopen => ( is => 'ro', isa => Bool, default => 0 ); before [ qw/get_service_list get_service_meta_info get_service_requests get_service_request_updates @@ -362,6 +363,8 @@ sub _populate_service_request_update_params { $status = 'NO_FURTHER_ACTION'; } elsif ( $state eq 'internal referral' ) { $status = 'INTERNAL_REFERRAL'; + } elsif ($comment->mark_open && $self->mark_reopen) { + $status = 'REOPEN'; } } else { if ( !FixMyStreet::DB::Result::Problem->open_states()->{$state} ) { |