aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-05-30 15:16:04 +0100
committerStruan Donald <struan@exo.org.uk>2012-05-30 15:16:04 +0100
commit8422130e3ade6b92af3cdb54f97f8c11fdbbc6ce (patch)
tree9e5b2105590a2bdf4c71ddb46e620df3ef2f051d
parent7b4f5a5d0529eeaf3e1e1f0328e5563a7b9d750c (diff)
always update the last update time on problems when fetching comments
-rw-r--r--perllib/Open311/GetServiceRequestUpdates.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm
index b5577ff6c..bb3583e38 100644
--- a/perllib/Open311/GetServiceRequestUpdates.pm
+++ b/perllib/Open311/GetServiceRequestUpdates.pm
@@ -98,19 +98,17 @@ 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 );
} 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 );
}
}
+ $p->lastupdate( $comment->created );
+ $p->update;
$comment->insert();
if ( $self->suppress_alerts ) {