aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/SendReport
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-05-23 10:53:04 +0100
committerStruan Donald <struan@exo.org.uk>2012-05-23 10:53:04 +0100
commit6f00ea0f96c25d81adf7e9e68a0228d193eb45d0 (patch)
tree7585e3d1af811fd7bb7b2b137bd522303fd95b29 /perllib/FixMyStreet/SendReport
parent37887356e600137090aa9819816d659be19ce11c (diff)
send address_id with NOTPINPOINTED to Bromley if not used map and no postcode
Diffstat (limited to 'perllib/FixMyStreet/SendReport')
-rw-r--r--perllib/FixMyStreet/SendReport/Open311.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm
index fe99e3043..845a6295c 100644
--- a/perllib/FixMyStreet/SendReport/Open311.pm
+++ b/perllib/FixMyStreet/SendReport/Open311.pm
@@ -31,6 +31,7 @@ sub send {
my $conf = FixMyStreet::App->model("DB::Open311conf")->search( { area_id => $council, endpoint => { '!=', '' } } )->first;
my $always_send_latlong = 1;
+ my $send_notpinpointed = 0;
my $basic_desc = 0;
@@ -38,8 +39,10 @@ sub send {
if ( $row->council =~ /2482/ ) {
my $extra = $row->extra;
- push @$extra, { name => 'northing', value => $h->{northing} };
- push @$extra, { name => 'easting', value => $h->{easting} };
+ if ( $row->used_map || ( !$row->used_map && !$row->postcode ) ) {
+ push @$extra, { name => 'northing', value => $h->{northing} };
+ push @$extra, { name => 'easting', value => $h->{easting} };
+ }
push @$extra, { name => 'report_url', value => $h->{url} };
push @$extra, { name => 'service_request_id_ext', value => $row->id };
push @$extra, { name => 'report_title', value => $row->title };
@@ -50,6 +53,7 @@ sub send {
$row->extra( $extra );
$always_send_latlong = 0;
+ $send_notpinpointed = 1;
$basic_desc = 1;
}
@@ -66,6 +70,7 @@ sub send {
endpoint => $conf->endpoint,
api_key => $conf->api_key,
always_send_latlong => $always_send_latlong,
+ send_notpinpointed => $send_notpinpointed,
basic_description => $basic_desc,
);