Skip to content

Commit

Permalink
[Brent] Food collection description is weekly.
Browse files Browse the repository at this point in the history
We switched to the task description previously,
but that appears not to be accurate either.
  • Loading branch information
dracos committed Oct 2, 2023
1 parent 1b37b22 commit 6b12921
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions perllib/FixMyStreet/Cobrand/Brent.pm
Original file line number Diff line number Diff line change
Expand Up @@ -739,10 +739,9 @@ sub bin_services_for_address {
my $calendar_save = {};
foreach (@$result) {
my $servicetask = $self->_get_current_service_task($_) or next;
my $desc_to_use = 'schedule';
my $schedules = _parse_schedules($servicetask);
# Brent has two overlapping schedules for food
$desc_to_use = 'task' if $_->{ServiceId} == 316;
my $schedules = _parse_schedules($servicetask, $desc_to_use);
$schedules->{description} =~ s/other\s*// if $_->{ServiceId} == 316;
$expired{$_->{Id}} = $schedules if $self->waste_sub_overdue( $schedules->{end_date}, weeks => 4 );

next unless $schedules->{next} or $schedules->{last};
Expand Down
2 changes: 1 addition & 1 deletion t/cobrand/brent.t
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ FixMyStreet::override_config {
ServiceName => 'Domestic Food Waste Collection',
ServiceTasks => { ServiceTask => {
Id => 403,
ScheduleDescription => 'every Thursday',
ScheduleDescription => 'every Thursday fortnightly',
ServiceTaskSchedules => { ServiceTaskSchedule => {
ScheduleDescription => 'every other Thursday',
StartDate => { DateTime => '2020-01-01T00:00:00Z' },
Expand Down

0 comments on commit 6b12921

Please sign in to comment.