aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/SendReport/Open311.pm10
-rw-r--r--perllib/Open311/Endpoint/Role/mySociety.pm3
2 files changed, 10 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm
index ce5ee80a0..c064eeef5 100644
--- a/perllib/FixMyStreet/SendReport/Open311.pm
+++ b/perllib/FixMyStreet/SendReport/Open311.pm
@@ -12,6 +12,7 @@ use Open311;
use Readonly;
Readonly::Scalar my $COUNCIL_ID_OXFORDSHIRE => 2237;
+Readonly::Scalar my $COUNCIL_ID_WARWICKSHIRE => 2243;
sub send {
my $self = shift;
@@ -65,7 +66,7 @@ sub send {
}
# extra Oxfordshire fields: send nearest street, postcode, northing and easting, and the FMS id
- if ( $row->bodies_str =~ /$COUNCIL_ID_OXFORDSHIRE/ ) {
+ if ( $row->bodies_str =~ /\b(?:$COUNCIL_ID_OXFORDSHIRE|$COUNCIL_ID_WARWICKSHIRE)\b/ ) {
my $extra = $row->extra;
push @$extra, { name => 'external_id', value => $row->id };
@@ -76,7 +77,12 @@ sub send {
}
$row->extra( $extra );
- $extended_desc = 'oxfordshire';
+ if ($row->bodies_str =~ /$COUNCIL_ID_OXFORDSHIRE/) {
+ $extended_desc = 'oxfordshire';
+ }
+ elsif ($row->bodies_str =~ /$COUNCIL_ID_WARWICKSHIRE/) {
+ $extended_desc = 'warwickshire';
+ }
}
# FIXME: we've already looked this up before
diff --git a/perllib/Open311/Endpoint/Role/mySociety.pm b/perllib/Open311/Endpoint/Role/mySociety.pm
index 3669c585b..de65baab6 100644
--- a/perllib/Open311/Endpoint/Role/mySociety.pm
+++ b/perllib/Open311/Endpoint/Role/mySociety.pm
@@ -68,7 +68,8 @@ sub GET_Service_Request_Updates_input_schema {
$self->get_jurisdiction_id_required_clause,
},
optional => {
- $self->get_jurisdiction_id_optional_clause,,
+ $self->get_jurisdiction_id_optional_clause,
+ api_key => $self->get_identifier_type('api_key'),
start_date => '/open311/datetime',
end_date => '/open311/datetime',
}