aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2015-07-22 12:17:08 +0100
committerDave Arter <davea@mysociety.org>2015-10-06 09:09:27 +0100
commit01dc45846079044669d12c6a1d2c67212f1a8ae6 (patch)
treef2900ffed95785dbcb2a0a54085517316cd3185e /perllib/FixMyStreet/Cobrand
parenta3b1269d17bcaeeabba5d81f92f8b7b2521a0fcb (diff)
[Zurich] Set report's public response before sending email to user
The 'public response' to a problem was being omitted from the email sent to the user when the problem is closed, because the email was sent before the report's 'extra' field was updated with the response body text. This commit sets the public response on the problem before sending the email.
Diffstat (limited to 'perllib/FixMyStreet/Cobrand')
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index 80874e3f5..6cc6bdcdb 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -606,6 +606,11 @@ sub admin_report_edit {
my $old_closure_state = $problem->get_extra_metadata('closure_status');
+ # update the public update from DM
+ if (my $update = $c->req->param('status_update')) {
+ $problem->set_extra_metadata(public_response => $update);
+ }
+
if (
($state eq 'confirmed')
&& $new_cat
@@ -728,11 +733,6 @@ sub admin_report_edit {
$problem->latitude( $c->get_param('latitude') );
$problem->longitude( $c->get_param('longitude') );
- # update the public update from DM
- if (my $update = $c->req->param('status_update')) {
- $problem->set_extra_metadata(public_response => $update);
- }
-
# send external_message if provided and state is *now* Wish|Extern
# e.g. was already, or was set in the Rueckmeldung ausstehend clause above.
if ( my $external_message = $c->req->params->{external_message}