diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-04-22 17:13:31 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-04-28 13:30:09 +0100 |
commit | 26f5223d57cfbcf35cde67d23c276fcb86e16cf3 (patch) | |
tree | 1ad24a3c7ed73fc336817aa9b4dadb4be37b63dc /perllib/FixMyStreet | |
parent | 4edf5a8a9b46311b3889a5382dfd05f7caf1d792 (diff) |
[Peterborough] Include Skanska ref in description.
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Peterborough.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Peterborough.pm b/perllib/FixMyStreet/Cobrand/Peterborough.pm index 882bef7eb..0ddaeacb6 100644 --- a/perllib/FixMyStreet/Cobrand/Peterborough.pm +++ b/perllib/FixMyStreet/Cobrand/Peterborough.pm @@ -40,6 +40,19 @@ sub geocoder_munge_results { sub admin_user_domain { "peterborough.gov.uk" } +around open311_extra_data => sub { + my ($orig, $self, $row, $h, $extra) = @_; + + my $open311_only = $self->$orig($row, $h, $extra); + foreach (@$open311_only) { + if ($_->{name} eq 'description') { + my ($ref) = grep { $_->{name} =~ /pcc-Skanska-csc-ref/i } @{$row->get_extra_fields}; + $_->{value} .= "\n\nSkanska CSC ref: $ref->{value}" if $ref; + } + } + return $open311_only; +}; + # remove categories which are informational only sub open311_pre_send { my ($self, $row, $open311) = @_; |