From aa1b31d659cf2f988ac5b9c1cc06dba9d866c3db Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 11 Jan 2012 10:01:52 +0000 Subject: Fix bug in admin interface deleting a mark-fixed comment. --- perllib/FixMyStreet/App/Controller/Admin.pm | 2 +- t/app/controller/admin.t | 2 +- 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; -- cgit v1.2.3