diff options
-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 ); |