aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-04-07 13:36:43 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-04-07 13:50:02 +0100
commitf1d0814c8689d3dff2d6793b13a097568d9518ee (patch)
treeb40d3cf6dba5931e0bba692d2e6f3ead9da491e3 /perllib
parent7a6f6b5adbd33bd2b1a9aa4e51120801b270f7aa (diff)
[UK] Show Highways England categories on cobrands.
Without allowing through the Highways England body, clicking on a Highways England road in these cobrands would leave no categories to be selected.
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/Cobrand/BathNES.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Bristol.pm1
-rw-r--r--perllib/FixMyStreet/Cobrand/Hounslow.pm5
-rw-r--r--perllib/FixMyStreet/Cobrand/Lincolnshire.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Northamptonshire.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/TfL.pm2
6 files changed, 9 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/Cobrand/BathNES.pm b/perllib/FixMyStreet/Cobrand/BathNES.pm
index dd1b93764..6a4f1c00b 100644
--- a/perllib/FixMyStreet/Cobrand/BathNES.pm
+++ b/perllib/FixMyStreet/Cobrand/BathNES.pm
@@ -161,7 +161,7 @@ sub categories_restriction {
# send_method set to 'Email::BathNES' (to use a custom template) which must
# be show on the cobrand.
return $rs->search( { -or => [
- 'me.send_method' => undef, # Open311 categories
+ 'me.send_method' => undef, # Open311 categories, or Highways England
'me.send_method' => '', # Open311 categories that have been edited in the admin
'me.send_method' => 'Email::BathNES', # Street Light Fault
'me.send_method' => 'Blackhole', # Parks categories
diff --git a/perllib/FixMyStreet/Cobrand/Bristol.pm b/perllib/FixMyStreet/Cobrand/Bristol.pm
index dd9907bd1..df2a1d61b 100644
--- a/perllib/FixMyStreet/Cobrand/Bristol.pm
+++ b/perllib/FixMyStreet/Cobrand/Bristol.pm
@@ -51,6 +51,7 @@ sub categories_restriction {
# cobrand, not the email categories from FMS.com. We've set up the
# Email categories with a devolved send_method, so can identify Open311
# categories as those which have a blank send_method.
+ # Also Highways England categories have a blank send_method.
return $rs->search( { 'me.send_method' => undef } );
}
diff --git a/perllib/FixMyStreet/Cobrand/Hounslow.pm b/perllib/FixMyStreet/Cobrand/Hounslow.pm
index fffaf52e9..2fc949546 100644
--- a/perllib/FixMyStreet/Cobrand/Hounslow.pm
+++ b/perllib/FixMyStreet/Cobrand/Hounslow.pm
@@ -64,7 +64,10 @@ sub categories_restriction {
# cobrand, not the email categories from FMS.com. We've set up the
# Email categories with a devolved send_method, so can identify Open311
# categories as those which have a blank send_method.
- return $rs->search( { 'me.send_method' => undef, 'body.name' => 'Hounslow Borough Council' } );
+ return $rs->search({
+ 'me.send_method' => undef,
+ 'body.name' => [ 'Hounslow Borough Council', 'Highways England' ],
+ });
}
sub report_sent_confirmation_email { 'external_id' }
diff --git a/perllib/FixMyStreet/Cobrand/Lincolnshire.pm b/perllib/FixMyStreet/Cobrand/Lincolnshire.pm
index eaed35118..ee40bb173 100644
--- a/perllib/FixMyStreet/Cobrand/Lincolnshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Lincolnshire.pm
@@ -57,7 +57,7 @@ sub categories_restriction {
# Lincolnshire is a two-tier council, but don't want to display
# all district-level categories on their cobrand - just a couple.
return $rs->search( { -or => [
- 'body.name' => "Lincolnshire County Council",
+ 'body.name' => [ "Lincolnshire County Council", 'Highways England' ],
# District categories:
'me.category' => { -in => [
diff --git a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
index 4f819d37e..3e32b0856 100644
--- a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
@@ -27,7 +27,7 @@ sub disambiguate_location {
sub categories_restriction {
my ($self, $rs) = @_;
- return $rs->search( { 'body.name' => 'Northamptonshire County Council' }, { join => 'body' });
+ return $rs->search( { 'body.name' => [ 'Northamptonshire County Council', 'Highways England' ] } );
}
sub send_questionnaires { 0 }
diff --git a/perllib/FixMyStreet/Cobrand/TfL.pm b/perllib/FixMyStreet/Cobrand/TfL.pm
index 72d1dbc86..b80929f25 100644
--- a/perllib/FixMyStreet/Cobrand/TfL.pm
+++ b/perllib/FixMyStreet/Cobrand/TfL.pm
@@ -112,7 +112,7 @@ sub base_url_for_report {
sub categories_restriction {
my ($self, $rs) = @_;
- $rs = $rs->search( { 'body.name' => 'TfL' } );
+ $rs = $rs->search( { 'body.name' => [ 'TfL', 'Highways England' ] } );
return $rs unless $self->{c}->stash->{categories_for_point}; # Admin page
return $rs->search( { category => { -not_in => $self->_tfl_no_resend_categories } } );
}