aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2019-08-19 13:10:20 +0100
committerDave Arter <davea@mysociety.org>2019-08-19 13:10:20 +0100
commit19943aefc49a1774d1f0e0f739c9dee80a0b1805 (patch)
treeaa5777bc7a6ba7a9042472950c6b3145e3600ade
parent23bfb619e0dc45ee0697691e79df271f66a04714 (diff)
[Westminster] Hide email categories from cobrand
-rw-r--r--perllib/FixMyStreet/Cobrand/Westminster.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Westminster.pm b/perllib/FixMyStreet/Cobrand/Westminster.pm
index d540894a8..c4df510ff 100644
--- a/perllib/FixMyStreet/Cobrand/Westminster.pm
+++ b/perllib/FixMyStreet/Cobrand/Westminster.pm
@@ -149,10 +149,17 @@ sub _fetch_features_url {
sub categories_restriction {
my ($self, $rs) = @_;
- # Westminster don't want TfL categories on their cobrand
+ # Westminster don't want TfL or email categories on their cobrand.
+ # Categories covering the council area have a mixture of Open311 and Email
+ # send methods. 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.
# XXX This still shows "These will be sent to TfL or Westminster City Council"
# on /report/new before a category is selected...
- return $rs->search( { 'body.name' => 'Westminster City Council' }, { join => 'body' });
+ return $rs->search( {
+ 'body.name' => 'Westminster City Council',
+ 'me.send_method' => undef,
+ }, { join => 'body' });
}
1;