diff options
author | Matthew Somerville <matthew@mysociety.org> | 2014-01-30 17:27:13 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2014-01-30 17:27:13 +0000 |
commit | cb1285f1f46fbee8f76d06a4097952268de12a0a (patch) | |
tree | 33bb73c25ce1494b6682afbf7db391f58d8c76b3 /perllib/Open311 | |
parent | 114659f272d26a646c6f2098cdbe0803843726f4 (diff) |
Don't update problem state from service request if currently hidden.
Diffstat (limited to 'perllib/Open311')
-rw-r--r-- | perllib/Open311/GetServiceRequestUpdates.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm index ae1f06a50..114a9cd8d 100644 --- a/perllib/Open311/GetServiceRequestUpdates.pm +++ b/perllib/Open311/GetServiceRequestUpdates.pm @@ -127,7 +127,9 @@ sub update_comments { # actually changing the state of the problem if ( FixMyStreet::DB::Result::Problem->council_states()->{$state} && $p->state ne $state && !( $p->is_fixed && FixMyStreet::DB::Result::Problem->fixed_states()->{$state} ) ) { - $p->state($state); + if ($p->is_visible) { + $p->state($state); + } $comment->problem_state($state); } } |