diff options
Diffstat (limited to 'perllib/Open311/PopulateServiceList.pm')
-rw-r--r-- | perllib/Open311/PopulateServiceList.pm | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm index c5fc4a506..d1a4d607f 100644 --- a/perllib/Open311/PopulateServiceList.pm +++ b/perllib/Open311/PopulateServiceList.pm @@ -228,10 +228,13 @@ sub _add_meta_to_contact { sort { $a->{order} <=> $b->{order} } @{ $meta_data->{attributes}->{attribute} }; - # we add these later on from bromley so don't list them here - # as we don't want to display them - if ( $self->_current_body->areas->{2482} ) { - my %ignore = map { $_ => 1 } qw/ + # Some Open311 endpoints, such as Bromley and Warwickshire send <metadata> + # for attributes which we *don't* want to display to the user (e.g. as + # fields in "category_extras" + + my %override = ( + #2482 + 'Bromley Council' => [qw( service_request_id_ext requested_datetime report_url @@ -243,8 +246,18 @@ sub _add_meta_to_contact { report_title public_anonymity_required email_alerts_requested - /; + ) ], + #2242, + 'Warwickshire County Council' => [qw( + external_id + easting + northing + closest_address + ) ], + ); + if (my $override = $override{ $self->_current_body->name }) { + my %ignore = map { $_ => 1 } @{ $override }; @meta = grep { ! $ignore{ $_->{ code } } } @meta; } |