aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/send-reports9
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm5
2 files changed, 11 insertions, 3 deletions
diff --git a/bin/send-reports b/bin/send-reports
index 3517f1ee0..90a6553eb 100755
--- a/bin/send-reports
+++ b/bin/send-reports
@@ -192,8 +192,13 @@ foreach my $row (@$unsent) {
}
$h{councils_name} = join(_(' and '), @dear);
- $h{multiple} = @dear>1 ? "[ " . _("This email has been sent to both councils covering the location of the problem, as the user did not categorise it; please ignore it if you're not the correct council to deal with the issue, or let us know what category of problem this is so we can add it to our system.") . " ]\n\n"
- : '';
+ if ($h{category} eq _('Other')) {
+ $h{multiple} = @dear>1 ? "[ " . _("This email has been sent to both councils covering the location of the problem, as the user did not categorise it; please ignore it if you're not the correct council to deal with the issue, or let us know what category of problem this is so we can add it to our system.") . " ]\n\n"
+ : '';
+ } else {
+ $h{multiple} = @dear>1 ? "[ " . _("This email has been sent to several councils covering the location of the problem, as the category selected is provided for all of them; please ignore it if you're not the correct council to deal with the issue.") . " ]\n\n"
+ : '';
+ }
$h{missing} = '';
if ($missing) {
my $name = $areas_info->{$missing}->{name};
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 736af16b1..dbefe9066 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -485,6 +485,7 @@ sub setup_categories_and_councils : Private {
else {
@contacts = keysort { $_->category } @contacts;
+ my %seen;
foreach my $contact (@contacts) {
push @area_ids_to_list, $contact->area_id;
@@ -495,7 +496,9 @@ sub setup_categories_and_councils : Private {
next if $contact->category eq _('Other');
- push @category_options, $contact->category;
+ push @category_options, $contact->category
+ unless $seen{$contact->category};
+ $seen{$contact->category} = 1;
}
if (@category_options) {