diff options
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index 44893f61d..4eedc1249 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -186,6 +186,21 @@ sub admin_report_edit { $problem->title( $c->req->param('title') ); $problem->detail( $c->req->param('detail') ); + # Final, public, Update from DM + if (my $update = $c->req->param('status_update')) { + FixMyStreet::App->model('DB::Comment')->create( { + text => $update, + user => $c->user->obj, + state => 'confirmed', + confirmed => \'ms_current_timestamp()', + problem => $problem, + mark_fixed => 0, + problem_state => 'fixed - council', + anonymous => 1, + } ); + $problem->state( 'fixed - council' ); + } + $problem->lastupdate( \'ms_current_timestamp()' ); $problem->update; @@ -200,6 +215,10 @@ sub admin_report_edit { $c->detach('index'); } + $c->stash->{updates} = [ $c->model('DB::Comment') + ->search( { problem_id => $problem->id }, { order_by => 'created' } ) + ->all ]; + return 1; } |