aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-07-02 15:16:27 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-07-08 07:46:23 +0100
commit002bcf0346adcb6669c236a784752ade896f22ba (patch)
treec612e1f972bb54748cf10cdd0c7df5c7c520fdad
parentbd92957261cb56961a40e365509c9e65a93ed055 (diff)
[UK] Ignore Highways England extra data.
If a report is made on a HE road, but it is not to be sent to HE (so the user has picked it's not on the HE road) and the category name is shared between council and HE, then the extra HE data (area, road, & sector) is still saved on the report, and our open311-adapter rejects it due to the additionnal information present. So make sure we remove this data before sending.
-rw-r--r--perllib/FixMyStreet/Cobrand/EastSussex.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/UKCouncils.pm1
2 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/EastSussex.pm b/perllib/FixMyStreet/Cobrand/EastSussex.pm
index 8d95980fe..04394f776 100644
--- a/perllib/FixMyStreet/Cobrand/EastSussex.pm
+++ b/perllib/FixMyStreet/Cobrand/EastSussex.pm
@@ -20,7 +20,7 @@ sub open311_extra_data {
}
}
$row->detail($row->detail . $text);
- return ();
+ return (undef, ['sect_label', 'road_name', 'area_name']);
}
sub open311_post_send {
diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
index f09d4314d..4634f4b14 100644
--- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm
+++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
@@ -333,6 +333,7 @@ sub open311_extra_data {
my $self = shift;
my $include = $self->call_hook(open311_extra_data_include => @_);
my $exclude = $self->call_hook(open311_extra_data_exclude => @_);
+ push @$exclude, 'sect_label', 'road_name', 'area_name';
return ($include, $exclude);
};