aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/SendReport/Open311.pm
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2015-07-20 11:43:11 +0100
committerDave Arter <davea@mysociety.org>2015-07-20 11:43:11 +0100
commit09ccfd13df2210916031d14a15062b14bb51f320 (patch)
tree9496dd31036830628ed9551037def1a4e8abbfdc /perllib/FixMyStreet/SendReport/Open311.pm
parentf094b76e74ff91ee0760565b85fa1ad6494943ad (diff)
Set external_id for Greenwich Open311 based on bodies_str, not cobrand
Problems for Greenwich reported via the fixmystreet cobrand weren't having the external_id included in the Open311 request and were failing.
Diffstat (limited to 'perllib/FixMyStreet/SendReport/Open311.pm')
-rw-r--r--perllib/FixMyStreet/SendReport/Open311.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm
index cfcac9bd8..fa216466e 100644
--- a/perllib/FixMyStreet/SendReport/Open311.pm
+++ b/perllib/FixMyStreet/SendReport/Open311.pm
@@ -13,6 +13,7 @@ use Readonly;
Readonly::Scalar my $COUNCIL_ID_OXFORDSHIRE => 2237;
Readonly::Scalar my $COUNCIL_ID_WARWICKSHIRE => 2243;
+Readonly::Scalar my $COUNCIL_ID_GREENWICH => 2493;
sub send {
my $self = shift;
@@ -127,7 +128,7 @@ sub send {
$revert = 1;
}
- if ($row->cobrand eq 'fixmybarangay' || $row->cobrand eq 'greenwich') {
+ if ($row->cobrand eq 'fixmybarangay' || $row->bodies_str =~ /$COUNCIL_ID_GREENWICH/) {
# FixMyBarangay endpoints expect external_id as an attribute, as do Greenwich
$row->set_extra_fields( { 'name' => 'external_id', 'value' => $row->id } );
$revert = 1;