aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report/New.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/New.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 57175269c..011e9e4b6 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -801,9 +801,6 @@ sub process_report : Private {
# set these straight from the params
$report->category( _ $params{category} ) if $params{category};
- # if there is a Message Manager message ID, save it
- $report->mm_msg_id( $params{mm_msg_id} ) if $params{mm_msg_id}=~/^\d+$/;
-
my $areas = $c->stash->{all_areas};
$report->areas( ',' . join( ',', sort keys %$areas ) . ',' );
@@ -1004,6 +1001,12 @@ sub save_user_and_report : Private {
# Set unknown to DB unknown
$report->council( undef ) if $report->council eq '-1';
+ # if there is a Message Manager message ID, pass it back to the client view
+ if ($c->req->param('mm_msg_id')=~/^\d+$/) {
+ $c->stash->{mm_msg_id} = $c->req->param('mm_msg_id');
+ $report->mm_msg_id( $c->req->param('mm_msg_id') );
+ }
+
# save the report;
$report->in_storage ? $report->update : $report->insert();