diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-12-18 17:49:08 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-12-18 17:49:08 +0000 |
commit | 495200d34afe198ebf13ab2f2529ad5ce00f9ebd (patch) | |
tree | f967c68f86557a7c2fca12a2bbccf89762d19f84 /perllib/Open311.pm | |
parent | fb5c4645d9749cf1379cbb05f9cea1545f216085 (diff) |
No title included in Oxfordshire send.
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r-- | perllib/Open311.pm | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm index 52e17e99d..9ed15bb10 100644 --- a/perllib/Open311.pm +++ b/perllib/Open311.pm @@ -22,7 +22,7 @@ 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 send_notpinpointed => ( is => 'ro', isa => 'Bool', default => 0 ); -has basic_description => ( is => 'ro', isa => 'Bool', default => 0 ); +has extended_description => ( is => 'ro', isa => 'Bool', default => 0 ); has use_service_as_deviceid => ( is => 'ro', isa => 'Bool', default => 0 ); has use_extended_updates => ( is => 'ro', isa => 'Bool', default => 0 ); @@ -95,12 +95,12 @@ sub _populate_service_request_params { my $service_code = shift; my $description; - if ( $self->basic_description ) { - $description = $problem->detail; - } else { + if ( $self->extended_description ) { $description = $self->_generate_service_request_description( $problem, $extra ); + } else { + $description = $problem->detail; } my ( $firstname, $lastname ) = ( $problem->user->name =~ /(\w+)\.?\s+(.+)/ ); @@ -168,8 +168,6 @@ sub _generate_service_request_description { my $extra = shift; my $description = <<EOT; -title: @{[$problem->title()]} - detail: @{[$problem->detail()]} url: $extra->{url} @@ -177,6 +175,13 @@ url: $extra->{url} Submitted via FixMyStreet EOT ; + if ($self->extended_description ne 'oxfordshire') { + $description = <<EOT; +title: @{[$problem->title()]} + +$description +EOT + } return $description; } |