diff options
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/SendReport/Open311.pm | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm index 804e876ee..f876f2e48 100644 --- a/perllib/FixMyStreet/SendReport/Open311.pm +++ b/perllib/FixMyStreet/SendReport/Open311.pm @@ -29,19 +29,10 @@ sub send { foreach my $council ( keys %{ $self->councils } ) { my $conf = FixMyStreet::App->model("DB::Open311conf")->search( { area_id => $council, endpoint => { '!=', '' } } )->first; + my $extended_sendrequest = 0; # Extra bromley fields if ( $row->council =~ /2482/ ) { - - my $extra = $row->extra; - push @$extra, { name => 'northing', value => $h->{northing} }; - push @$extra, { name => 'easting', value => $h->{easting} }; - push @$extra, { name => 'report_url', value => $h->{url} }; - push @$extra, { name => 'service_request_id_ext', value => $row->id }; - push @$extra, { name => 'report_title', value => $row->title }; - push @$extra, { name => 'public_anonymity_required', value => $row->anonymous ? 'TRUE' : 'FALSE' }; - push @$extra, { name => 'email_alerts_requested', value => 'FALSE' }; # always false as can never request them - push @$extra, { name => 'requested_datetime', value => $row->confirmed }; - $row->extra( $extra ); + $extended_sendrequest = 1; } # FIXME: we've already looked this up before @@ -52,9 +43,10 @@ sub send { } ); my $open311 = Open311->new( - jurisdiction => $conf->jurisdiction, - endpoint => $conf->endpoint, - api_key => $conf->api_key, + jurisdiction => $conf->jurisdiction, + endpoint => $conf->endpoint, + api_key => $conf->api_key, + extended_sendrequest => $extended_sendrequest, ); # non standard west berks end points |