diff options
Diffstat (limited to 'perllib/FixMyStreet/SendReport')
-rw-r--r-- | perllib/FixMyStreet/SendReport/Email/BathNES.pm | 16 | ||||
-rw-r--r-- | perllib/FixMyStreet/SendReport/Open311.pm | 7 | ||||
-rw-r--r-- | perllib/FixMyStreet/SendReport/Zurich.pm | 8 |
3 files changed, 25 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/SendReport/Email/BathNES.pm b/perllib/FixMyStreet/SendReport/Email/BathNES.pm new file mode 100644 index 000000000..786d36d1e --- /dev/null +++ b/perllib/FixMyStreet/SendReport/Email/BathNES.pm @@ -0,0 +1,16 @@ +package FixMyStreet::SendReport::Email::BathNES; + +use Moo; + +BEGIN { extends 'FixMyStreet::SendReport::Email'; } + +sub get_template { + my ( $self, $row ) = @_; + if ( $row->category eq 'Street Light Fault' ) { + return 'bathnes/submit-street-light-fault.txt'; + } else { + return 'submit.txt'; + } +} + +1; diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm index ecda0bca1..84aa851ed 100644 --- a/perllib/FixMyStreet/SendReport/Open311.pm +++ b/perllib/FixMyStreet/SendReport/Open311.pm @@ -28,6 +28,7 @@ sub send { send_notpinpointed => 0, use_service_as_deviceid => 0, extended_description => 1, + multi_photos => 0, ); my $cobrand = $body->get_cobrand_handler || $row->get_cobrand_logged; @@ -47,13 +48,15 @@ sub send { if ($_->{code} eq $id_field) { push @$extra, { name => $id_field, value => $row->id }; } elsif ($_->{code} eq 'closest_address' && $h->{closest_address}) { - push @$extra, { name => $_->{code}, value => $h->{$_->{code}} }; + push @$extra, { name => $_->{code}, value => "$h->{closest_address}" }; } elsif ($_->{code} =~ /^(easting|northing)$/) { # NB If there's ever a cobrand with always_send_latlong=0 and # send_notpinpointed=0 then this line will need changing to # consider the send_notpinpointed check, as per the # '#NOTPINPOINTED#' code in perllib/Open311.pm. - if ( $row->used_map || $open311_params{always_send_latlong} ) { + if ( $row->used_map || $open311_params{always_send_latlong} || ( + !$row->used_map && !$row->postcode && $open311_params{send_notpinpointed} + ) ) { push @$extra, { name => $_->{code}, value => $h->{$_->{code}} }; } } diff --git a/perllib/FixMyStreet/SendReport/Zurich.pm b/perllib/FixMyStreet/SendReport/Zurich.pm index b38981d94..59adfd688 100644 --- a/perllib/FixMyStreet/SendReport/Zurich.pm +++ b/perllib/FixMyStreet/SendReport/Zurich.pm @@ -44,15 +44,15 @@ sub get_template { my ( $self, $row ) = @_; my $template; - if ( $row->state eq 'unconfirmed' || $row->state eq 'confirmed' ) { + if ( $row->state eq 'submitted' || $row->state eq 'confirmed' ) { $template = 'submit.txt'; } elsif ( $row->state eq 'in progress' ) { $template = 'submit-in-progress.txt'; - } elsif ( $row->state eq 'planned' ) { + } elsif ( $row->state eq 'feedback pending' ) { $template = 'submit-feedback-pending.txt'; - } elsif ( $row->state eq 'investigating' ) { + } elsif ( $row->state eq 'wish' ) { $template = 'submit-external-wish.txt'; - } elsif ( $row->state eq 'closed' ) { + } elsif ( $row->state eq 'external' ) { $template = 'submit-external.txt'; if ( $row->extra->{third_personal} ) { $template = 'submit-external-personal.txt'; |