aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-03-11 10:20:19 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-03-12 11:56:07 +0000
commit7b6826df25c52a99ae53e460c55599c82def09fd (patch)
treef3d68baf0002378ba9dae6742043a6a1c3d446c1 /perllib
parent36487240bae63833e7e82ac673be92eb9c033d4c (diff)
[UK Councils] Make sure server_set as appropriate.
After the change in 1cff2a0e, we need to make sure this is set so that the relevant fields are not shown in the front end.
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/Cobrand/Bristol.pm9
-rw-r--r--perllib/FixMyStreet/Cobrand/Bromley.pm5
-rw-r--r--perllib/FixMyStreet/Cobrand/Greenwich.pm9
3 files changed, 23 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bristol.pm b/perllib/FixMyStreet/Cobrand/Bristol.pm
index 0660acc79..fa2d3fabb 100644
--- a/perllib/FixMyStreet/Cobrand/Bristol.pm
+++ b/perllib/FixMyStreet/Cobrand/Bristol.pm
@@ -75,4 +75,13 @@ sub open311_config {
$params->{always_send_email} = 1;
}
+sub open311_contact_meta_override {
+ my ($self, $service, $contact, $meta) = @_;
+
+ my %server_set = (easting => 1, northing => 1);
+ foreach (@$meta) {
+ $_->{automated} = 'server_set' if $server_set{$_->{code}};
+ }
+}
+
1;
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm
index f6a7be837..69aad01c8 100644
--- a/perllib/FixMyStreet/Cobrand/Bromley.pm
+++ b/perllib/FixMyStreet/Cobrand/Bromley.pm
@@ -245,6 +245,11 @@ sub open311_contact_meta_override {
$contact->set_extra_metadata( id_field => 'service_request_id_ext');
+ my %server_set = (easting => 1, northing => 1, service_request_id_ext => 1);
+ foreach (@$meta) {
+ $_->{automated} = 'server_set' if $server_set{$_->{code}};
+ }
+
# Lights we want to store feature ID, PROW on all categories.
push @$meta, {
code => 'prow_reference',
diff --git a/perllib/FixMyStreet/Cobrand/Greenwich.pm b/perllib/FixMyStreet/Cobrand/Greenwich.pm
index 6ff30e83d..2aaa5d776 100644
--- a/perllib/FixMyStreet/Cobrand/Greenwich.pm
+++ b/perllib/FixMyStreet/Cobrand/Greenwich.pm
@@ -66,4 +66,13 @@ sub open311_config {
$row->set_extra_fields( @$extra );
}
+sub open311_contact_meta_override {
+ my ($self, $service, $contact, $meta) = @_;
+
+ my %server_set = (easting => 1, northing => 1, closest_address => 1);
+ foreach (@$meta) {
+ $_->{automated} = 'server_set' if $server_set{$_->{code}};
+ }
+}
+
1;