diff options
author | Dave Arter <davea@mysociety.org> | 2015-05-26 15:04:56 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2015-10-06 09:09:27 +0100 |
commit | 91e603533b54a184c7c39ed22a8be8b558e02602 (patch) | |
tree | 9c8d941034f4393073b8f8501353c7b23f46aac9 | |
parent | b16a1d18087728a84abdd76bc8f69d2cba54c65e (diff) |
[Zurich] Don't include external messages in a report's internal notices section
See mysociety/FixMyStreet-Commercial#674, mysociety/FixMyStreet-Commercial#673
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 2 | ||||
-rw-r--r-- | templates/web/zurich/admin/list_updates.html | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index fae39b28b..80874e3f5 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -743,6 +743,8 @@ sub admin_report_edit { or die "Body $external not found"; $problem->set_extra_metadata_if_undefined( moderated_overdue => $self->overdue( $problem ) ); + # Create a Comment on this Problem with the content of the external message. + # NB this isn't directly shown anywhere, but is for logging purposes. $problem->add_to_comments( { text => ( sprintf '(%s %s) %s', diff --git a/templates/web/zurich/admin/list_updates.html b/templates/web/zurich/admin/list_updates.html index defd83f21..bde28567b 100644 --- a/templates/web/zurich/admin/list_updates.html +++ b/templates/web/zurich/admin/list_updates.html @@ -7,10 +7,12 @@ [% internal_updates=[]; sdm_notes=[]; FOREACH update IN updates; - IF update.extra.is_internal_note; - internal_updates.unshift(update); - ELSE; - sdm_notes.unshift(update); + IF NOT update.extra.is_external_message; + IF update.extra.is_internal_note; + internal_updates.unshift(update); + ELSE; + sdm_notes.unshift(update); + END; END; END %] |