aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-01-11 10:01:52 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-01-11 10:01:52 +0000
commitaa1b31d659cf2f988ac5b9c1cc06dba9d866c3db (patch)
tree7ed9203675cb31939e4c6dbe29aac42c392378d0
parente9b0c003c94fd70dd18a56502e3501753ecfe3ca (diff)
Fix bug in admin interface deleting a mark-fixed comment.
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm2
-rw-r--r--t/app/controller/admin.t2
2 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index c988b23c1..04dfaf409 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -770,7 +770,7 @@ sub update_edit : Path('update_edit') : Args(1) {
# If we're hiding an update, see if it marked as fixed and unfix if so
if ( $new_state eq 'hidden' && $update->mark_fixed ) {
- if ( $update->problem->state eq 'fixed' ) {
+ if ( $update->problem->state =~ /^fixed/ ) {
$update->problem->state('confirmed');
$update->problem->update;
}
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index beeb6c9c1..0a6f09585 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -947,7 +947,7 @@ subtest 'hiding comment marked as fixed reopens report' => sub {
$update->mark_fixed( 1 );
$update->update;
- $report->state('fixed');
+ $report->state('fixed - user');
$report->update;