diff options
author | Struan Donald <struan@exo.org.uk> | 2012-05-08 13:49:40 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-05-08 13:49:40 +0100 |
commit | 0cd38fb6150d66892fb249ab4906df3cbc5bebb7 (patch) | |
tree | e83f67c43f4ede6a3f52efe7a034577fa65ddc77 /perllib/Open311.pm | |
parent | 485f739aad7371a0739b42dfb165f9f24882c107 (diff) |
option to only send problem details over open311 for Bromley
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r-- | perllib/Open311.pm | 12 |
1 files changed, 9 insertions, 3 deletions
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+(.+)/ ); |