diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-09-18 16:14:30 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-09-18 16:14:30 +0100 |
commit | d669a7b97ef7ef12e0acae8d2856ea97419a5e4a (patch) | |
tree | 54866a07952143ffed47885c8d6b0d4e93c7a634 | |
parent | b6d36b114d4520fa874a39fc5be6696e09b19fc6 (diff) |
[Northamptonshire] Always update report with Open311 state change.
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Northamptonshire.pm | 11 |
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) = @_; |