Skip to content

Commit

Permalink
[Brent] Improve message in referral email.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Jul 2, 2024
1 parent 5f32344 commit 6e724fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions perllib/FixMyStreet/Cobrand/Brent.pm
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ sub open311_post_send {
if ($row->category eq 'Request new container' && $row->get_extra_field_value('request_referral') && !$row->get_extra_metadata('extra_email_sent')) {
my $emails = $self->feature('open311_email');
if (my $dest = $emails->{$row->category}) {
$h->{missing} = "Dear team, you have received this notification because a resident has tried to request a container but the system believes a similar request was recently made against this address. Please assess the request against Echo and then inform the customer of your decision. If authorising the request, please add it to Echo as a container request.\n\n";
my $sender = FixMyStreet::SendReport::Email->new( to => [ $dest ]);
$sender->send($row, $h);
if ($sender->success) {
Expand Down
2 changes: 1 addition & 1 deletion t/cobrand/brent.t
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ FixMyStreet::override_config {
my @email = $mech->get_email;
is @email, $emails;
if ($emails == 2) {
like $mech->get_text_body_from_email($email[0]), qr/submitted the following report/;
like $mech->get_text_body_from_email($email[0]), qr/a resident has tried to request a container/;
like $mech->get_text_body_from_email($email[1]), qr/We aim to deliver this container/;
} else {
like $mech->get_text_body_from_email($email[0]), qr/We aim to deliver this container/;
Expand Down

0 comments on commit 6e724fa

Please sign in to comment.