diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-03-12 23:17:05 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-03-12 23:18:32 +0000 |
commit | 500d5f63a85b81db8efe9fbfae3c093c2f0356a8 (patch) | |
tree | 5c99b741c5bc99df6ed89ba5bf062f75b8621682 | |
parent | 2d303093aa9ddb482aa4cfcf1bffab06e1e574f4 (diff) |
Update lastupdate timestamp if anything has changed, not just state.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 0e34ea64b..83f77f401 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -627,10 +627,6 @@ sub report_edit : Path('report_edit') : Args(1) { $problem->photo(undef); } - if ( $new_state ne $old_state ) { - $problem->lastupdate( \'ms_current_timestamp()' ); - } - if ( $new_state eq 'confirmed' and $old_state eq 'unconfirmed' ) { $problem->confirmed( \'ms_current_timestamp()' ); } @@ -639,6 +635,7 @@ sub report_edit : Path('report_edit') : Args(1) { $problem->discard_changes; } else { + $problem->lastupdate( \'ms_current_timestamp()' ) if $edited || $new_state ne $old_state; $problem->update; if ( $new_state ne $old_state ) { |