aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand/Peterborough.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2020-06-18 16:29:56 +0100
committerStruan Donald <struan@exo.org.uk>2020-09-09 13:53:57 +0100
commitf98bb79a77866fb08ec95f5e64f07faa0ba42ceb (patch)
tree073d4b4101efc5578541a609dba039afceab4f5d /perllib/FixMyStreet/Cobrand/Peterborough.pm
parent43f92bcb01f04fe48eb87ff3a42afbf58540c690 (diff)
[Peterborough] add extra open311 properties for bartec
Bartec uses these to look up the UPRN of the property.
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/Peterborough.pm')
-rw-r--r--perllib/FixMyStreet/Cobrand/Peterborough.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Peterborough.pm b/perllib/FixMyStreet/Cobrand/Peterborough.pm
index dd6592a7c..199fcdd36 100644
--- a/perllib/FixMyStreet/Cobrand/Peterborough.pm
+++ b/perllib/FixMyStreet/Cobrand/Peterborough.pm
@@ -51,6 +51,15 @@ around open311_extra_data_include => sub {
$_->{value} .= "\n\nSkanska CSC ref: $ref->{value}" if $ref;
}
}
+ if ( $row->geocode && $row->contact->email =~ /Bartec/ ) {
+ my $address = $row->geocode->{resourceSets}->[0]->{resources}->[0]->{address};
+ my ($number, $street) = $address->{addressLine} =~ /\s*(\d*)\s*(.*)/;
+ push @$open311_only, (
+ { name => 'postcode', value => $address->{postalCode} },
+ { name => 'house_no', value => $number },
+ { name => 'street', value => $street }
+ );
+ }
return $open311_only;
};
# remove categories which are informational only