Skip to content

Commit

Permalink
[Brent] Include small items service name in report
Browse files Browse the repository at this point in the history
As it's not a service with any collections, it isn't
included in the standard lookup.
  • Loading branch information
dracos committed Oct 25, 2023
1 parent 02c996f commit a2d331a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions perllib/FixMyStreet/Cobrand/Brent.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,13 @@ sub waste_munge_report_data {

my $address = $c->stash->{property}->{address};
my $service = $c->stash->{services}{$id}{service_name};

my $cfg = $self->feature('echo');
my $service_id_missed = $cfg->{bulky_service_id_missed};
if (!$service && $id == $service_id_missed) {
$service = 'small items / clinical';
}

$data->{title} = "Report missed $service";
$data->{detail} = "$data->{title}\n\n$address";
$c->set_param('service_id', $id);
Expand Down
1 change: 1 addition & 0 deletions t/app/controller/waste_brent_small_items.t
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ FixMyStreet::override_config {
my $report = FixMyStreet::DB->resultset("Problem")->search(undef, { order_by => { -desc => 'id' } })->first;
is $report->category, 'Report missed collection';
is $report->get_extra_field_value('service_id'), 787;
is $report->title, 'Report missed small items / clinical';

$echo->mock( 'GetEventsForObject', sub { [ {
EventTypeId => 2964,
Expand Down

0 comments on commit a2d331a

Please sign in to comment.