diff options
author | Dave Whiteland <dave@mysociety.org> | 2012-12-10 15:54:04 +0000 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2012-12-10 15:54:04 +0000 |
commit | 3b4b3f92223d96d96baff61ae96322dbc0188bcc (patch) | |
tree | 72e238e5b3ad84df4bf417518a5a8fd3d7fd02fd /perllib/FixMyStreet/SendReport/Open311.pm | |
parent | 30c91e3962771ddc4dc8933617a46f269e8ca972 (diff) |
Oxfordshire wants easting/northing, so send then as Open311 attributes
Diffstat (limited to 'perllib/FixMyStreet/SendReport/Open311.pm')
-rw-r--r-- | perllib/FixMyStreet/SendReport/Open311.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm index 8d7a418af..c4b99423a 100644 --- a/perllib/FixMyStreet/SendReport/Open311.pm +++ b/perllib/FixMyStreet/SendReport/Open311.pm @@ -67,6 +67,16 @@ sub send { $basic_desc = 1; } + # extra Oxfordshire fields: send northing and easting + if ( $row->council =~ /2237/ ) { + my $extra = $row->extra; + if ( $row->used_map || ( !$row->used_map && !$row->postcode ) ) { + push @$extra, { name => 'northing', value => $h->{northing} }; + push @$extra, { name => 'easting', value => $h->{easting} }; + $row->extra( $extra ); + } + } + # FIXME: we've already looked this up before my $contact = FixMyStreet::App->model("DB::Contact")->find( { deleted => 0, @@ -102,7 +112,7 @@ sub send { my $resp = $open311->send_service_request( $row, $h, $contact->email ); # make sure we don't save user changes from above - if ( $row->council =~ /2218/ || $row->council =~ /2482/ || $row->cobrand eq 'fixmybarangay') { + if ( $row->council =~ /(2218|2482|2237)/ || $row->cobrand eq 'fixmybarangay') { $row->discard_changes(); } |