diff options
author | Dave Whiteland <dave@mysociety.org> | 2012-12-13 10:10:39 +0000 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2012-12-13 10:10:39 +0000 |
commit | 0d7f96bf84e4bbed8305d267ac402ec30b418033 (patch) | |
tree | 3ec011b47e54eac0b4782e2f76b08ec78df5bec2 | |
parent | 0ebc4093bfdc047e1d74c815fb39ddf104a22ed1 (diff) |
Oxfordshire Open311 requires FMS id as attribute and a custom endpoint URL
-rw-r--r-- | perllib/FixMyStreet/SendReport/Open311.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm index 7b8f98bfd..418752b95 100644 --- a/perllib/FixMyStreet/SendReport/Open311.pm +++ b/perllib/FixMyStreet/SendReport/Open311.pm @@ -70,14 +70,15 @@ sub send { $basic_desc = 1; } - # extra Oxfordshire fields: send northing and easting + # extra Oxfordshire fields: send northing and easting, and the FMS id if ( $row->council =~ /$COUNCIL_ID_OXFORDSHIRE/ ) { my $extra = $row->extra; + push @$extra, { name => 'external_id', value => $row->id }; 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 ); } + $row->extra( $extra ); } # FIXME: we've already looked this up before @@ -102,6 +103,11 @@ sub send { $open311->endpoints( { services => 'Services', requests => 'Requests' } ); } + # non-standard Oxfordshire endpoint (because it's just a script, not a full Open311 service) + if ( $row->council =~ /$COUNCIL_ID_OXFORDSHIRE/ ) { + $open311->endpoints( { requests => 'open311_service_request.pl' } ); + } + # required to get round issues with CRM constraints if ( $row->council =~ /2218/ ) { $row->user->name( $row->user->id . ' ' . $row->user->name ); |