diff options
author | Dave Whiteland <dave@mysociety.org> | 2012-06-25 14:33:57 +0100 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2012-06-25 14:33:57 +0100 |
commit | f9fe02f91ac72ea2954ee68a5f32d96a237fcd67 (patch) | |
tree | f91d63ab3d6b9cd3555587090a541c870ecd3363 /perllib/Open311/GetServiceRequestUpdates.pm | |
parent | 67da8efc720d2d0bd22bd9fe8655b7e983b35bb4 (diff) | |
parent | 45b3040884d7089e7d8c6f4acccd657b91c92a04 (diff) |
Merge branch 'master' into fmb-read-only
Conflicts:
.gitignore
bin/make_css
perllib/FixMyStreet/Cobrand/FixMyStreet.pm
Diffstat (limited to 'perllib/Open311/GetServiceRequestUpdates.pm')
-rw-r--r-- | perllib/Open311/GetServiceRequestUpdates.pm | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm index b5577ff6c..c30d05b22 100644 --- a/perllib/Open311/GetServiceRequestUpdates.pm +++ b/perllib/Open311/GetServiceRequestUpdates.pm @@ -98,19 +98,15 @@ sub update_comments { if ( $comment->created_local > $p->lastupdate_local ) { if ( $p->is_open and lc($request->{status}) eq 'closed' ) { $p->state( 'fixed - council' ); - $p->lastupdate( $comment->created ); - $p->update; - - $comment->mark_fixed( 1 ); + $comment->problem_state( 'fixed - council' ); } elsif ( ( $p->is_closed || $p->is_fixed ) and lc($request->{status}) eq 'open' ) { $p->state( 'confirmed' ); - $p->lastupdate( $comment->created ); - $p->update; - - $comment->mark_open( 1 ); + $comment->problem_state( 'confirmed' ); } } + $p->lastupdate( $comment->created ); + $p->update; $comment->insert(); if ( $self->suppress_alerts ) { |