diff options
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Bexley.pm | 7 | ||||
-rw-r--r-- | perllib/FixMyStreet/TestMech.pm | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bexley.pm b/perllib/FixMyStreet/Cobrand/Bexley.pm index 5539e8bfc..0fbb8944b 100644 --- a/perllib/FixMyStreet/Cobrand/Bexley.pm +++ b/perllib/FixMyStreet/Cobrand/Bexley.pm @@ -110,7 +110,7 @@ sub open311_post_send { if ($row->category eq 'Parks and open spaces') { $p1_email = 1 if $reportType =~ /locked in a park|Wild animal/; $p1_email = 1 if $dangerous eq 'Yes' && $reportType =~ /Playgrounds|park furniture|gates are broken|Vandalism|Other/; - } else { + } elsif (!$lighting{$row->category}) { $p1_email = 1 if $dangerous eq 'Yes'; } @@ -118,8 +118,9 @@ sub open311_post_send { if ($row->category eq 'Abandoned and untaxed vehicles' || $row->category eq 'Dead animal' || $p1_email) { push @to, [ $emails->{p1}, 'Bexley P1 email' ] if $emails->{p1}; } - if ($lighting{$row->category}) { - push @to, [ $emails->{lighting}, 'FixMyStreet Bexley Street Lighting' ] if $emails->{lighting}; + if ($lighting{$row->category} && $emails->{lighting}) { + my @lighting = split /,/, $emails->{lighting}; + push @to, [ $_, 'FixMyStreet Bexley Street Lighting' ] for @lighting; } return unless @to; my $sender = FixMyStreet::SendReport::Email->new( to => \@to ); diff --git a/perllib/FixMyStreet/TestMech.pm b/perllib/FixMyStreet/TestMech.pm index cc2020b63..e8b08ef19 100644 --- a/perllib/FixMyStreet/TestMech.pm +++ b/perllib/FixMyStreet/TestMech.pm @@ -741,6 +741,7 @@ sub create_comment_for_problem { $params->{problem_state} = $problem_state; $params->{state} = $state; $params->{mark_fixed} = $problem_state && FixMyStreet::DB::Result::Problem->fixed_states()->{$problem_state} ? 1 : 0; + $params->{confirmed} = \'current_timestamp' unless $params->{confirmed} || $state eq 'unconfirmed'; FixMyStreet::App->model('DB::Comment')->create($params); } |