aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-09-18 16:14:30 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-09-18 16:14:30 +0100
commitd669a7b97ef7ef12e0acae8d2856ea97419a5e4a (patch)
tree54866a07952143ffed47885c8d6b0d4e93c7a634
parentb6d36b114d4520fa874a39fc5be6696e09b19fc6 (diff)
[Northamptonshire] Always update report with Open311 state change.
-rw-r--r--perllib/FixMyStreet/Cobrand/Northamptonshire.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
index f16700820..7baeaba96 100644
--- a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
@@ -76,6 +76,17 @@ sub open311_config {
$params->{multi_photos} = 1;
}
+sub open311_get_update_munging {
+ my ($self, $comment) = @_;
+
+ # If we've received an update via Open311, let us always take its state change
+ my $state = $comment->problem_state;
+ my $p = $comment->problem;
+ if ($state && $p->state ne $state && $p->is_visible) {
+ $p->state($state);
+ }
+}
+
sub should_skip_sending_update {
my ($self, $comment) = @_;