diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-01-24 16:12:17 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-01-24 16:12:35 +0000 |
commit | 75c22aec72a0b7d767ef9eb18f9c8fbd1b0d29f2 (patch) | |
tree | 9ae617dee7fc368acd79b15585fbc05c86cc5443 | |
parent | 058a1b47ceaa962625c165afdebd92316e73b13f (diff) |
[Bexley] Out-of-hours email for all highways.
The changes in 27fe9940 to send more P1 emails meant the out-of-hours
email wasn't being correct sent when it should have been.
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Bexley.pm | 2 | ||||
-rw-r--r-- | t/cobrand/bexley.t | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bexley.pm b/perllib/FixMyStreet/Cobrand/Bexley.pm index bbef4154b..5fc7b37a0 100644 --- a/perllib/FixMyStreet/Cobrand/Bexley.pm +++ b/perllib/FixMyStreet/Cobrand/Bexley.pm @@ -167,8 +167,10 @@ sub open311_post_send { my $reportType = $row->get_extra_field_value('reportType') || ''; $p1_email = 1 if $reportType eq 'Cover missing'; $p1_email = 1 if $dangerous eq 'Yes'; + $outofhours_email = 1 if $dangerous eq 'Yes'; } elsif ($row->category eq 'Damage to kerb' || $row->category eq 'Damaged road' || $row->category eq 'Damaged pavement') { $p1_email = 1; + $outofhours_email = 1 if $dangerous eq 'Yes'; } elsif (!$lighting{$row->category}) { $p1_email = 1 if $dangerous eq 'Yes'; $outofhours_email = 1 if $dangerous eq 'Yes'; diff --git a/t/cobrand/bexley.t b/t/cobrand/bexley.t index d7e996e0d..f0c8d24e4 100644 --- a/t/cobrand/bexley.t +++ b/t/cobrand/bexley.t @@ -84,11 +84,11 @@ FixMyStreet::override_config { extra => { 'name' => 'reportType', description => 'Type of report', 'value' => 'Cover missing' } }, { category => 'Gulley covers', code => 'GULL', extra => { 'name' => 'reportType', description => 'Type of report', 'value' => 'Cover damaged' } }, - { category => 'Gulley covers', email => ['p1'], code => 'GULL', + { category => 'Gulley covers', email => ['p1', 'outofhours', 'ooh2'], code => 'GULL', extra => { 'name' => 'dangerous', description => 'Was it dangerous?', 'value' => 'Yes' } }, { category => 'Damaged road', code => 'ROAD', email => ['p1'], extra => { 'name' => 'dangerous', description => 'Was it dangerous?', 'value' => 'No' } }, - { category => 'Damaged road', code => 'ROAD', email => ['p1'], + { category => 'Damaged road', code => 'ROAD', email => ['p1', 'outofhours', 'ooh2'], extra => { 'name' => 'dangerous', description => 'Was it dangerous?', 'value' => 'Yes' } }, { category => 'Lamp post', code => 'StreetLightingLAMP', email => ['thirdparty', 'another'], extra => { 'name' => 'dangerous', description => 'Was it dangerous?', 'value' => 'No' } }, |