aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/SendReport/Open311.pm7
-rw-r--r--perllib/Open311.pm12
2 files changed, 16 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm
index e572a76e5..fe99e3043 100644
--- a/perllib/FixMyStreet/SendReport/Open311.pm
+++ b/perllib/FixMyStreet/SendReport/Open311.pm
@@ -31,6 +31,9 @@ sub send {
my $conf = FixMyStreet::App->model("DB::Open311conf")->search( { area_id => $council, endpoint => { '!=', '' } } )->first;
my $always_send_latlong = 1;
+
+ my $basic_desc = 0;
+
# Extra bromley fields
if ( $row->council =~ /2482/ ) {
@@ -45,7 +48,10 @@ sub send {
push @$extra, { name => 'requested_datetime', value => DateTime::Format::W3CDTF->format_datetime($row->confirmed_local->set_nanosecond(0)) };
push @$extra, { name => 'email', value => $row->user->email };
$row->extra( $extra );
+
$always_send_latlong = 0;
+
+ $basic_desc = 1;
}
# FIXME: we've already looked this up before
@@ -60,6 +66,7 @@ sub send {
endpoint => $conf->endpoint,
api_key => $conf->api_key,
always_send_latlong => $always_send_latlong,
+ basic_description => $basic_desc,
);
# non standard west berks end points
diff --git a/perllib/Open311.pm b/perllib/Open311.pm
index 47baed082..b380409cf 100644
--- a/perllib/Open311.pm
+++ b/perllib/Open311.pm
@@ -21,6 +21,7 @@ has debug_details => ( is => 'rw', 'isa' => 'Str', default => '' );
has success => ( is => 'rw', 'isa' => 'Bool', default => 0 );
has error => ( is => 'rw', 'isa' => 'Str', default => '' );
has always_send_latlong => ( is => 'ro', isa => 'Bool', default => 1 );
+has basic_description => ( is => 'ro', isa => 'Bool', default => 0 );
before [
qw/get_service_list get_service_meta_info get_service_requests get_service_request_updates
@@ -82,9 +83,14 @@ sub _populate_service_request_params {
my $extra = shift;
my $service_code = shift;
- my $description = $self->_generate_service_request_description(
- $problem, $extra
- );
+ my $description;
+ if ( $self->basic_description ) {
+ $description = $problem->detail;
+ } else {
+ $description = $self->_generate_service_request_description(
+ $problem, $extra
+ );
+ }
my ( $firstname, $lastname ) = ( $problem->user->name =~ /(\w+)\s+(.+)/ );