aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/SendReport/Open311.pm
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2018-06-07 13:28:45 +0200
committerMarius Halden <marius.h@lden.org>2018-06-07 13:28:45 +0200
commit956f8b8a065824f9a9dc379eba1d0aa8b1b669cf (patch)
tree49f9ccb147b18dddee97500d4df7a3fb3dd3737c /perllib/FixMyStreet/SendReport/Open311.pm
parent782457d016084c8de04989dbc824a71899f8b41b (diff)
parent4dbf5371f79c5f290c08e561ba2c881e96b58669 (diff)
Merge tag 'v2.3.3' into fiksgatami-dev
Diffstat (limited to 'perllib/FixMyStreet/SendReport/Open311.pm')
-rw-r--r--perllib/FixMyStreet/SendReport/Open311.pm7
1 files changed, 5 insertions, 2 deletions
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}} };
}
}