diff options
author | Struan Donald <struan@exo.org.uk> | 2018-08-08 16:12:58 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2018-10-01 07:57:22 +0100 |
commit | 1b46273ffd41876b95a96cdaa41ef5f99b04f643 (patch) | |
tree | f24dbfa1a274a154a7a5c7b6c5663a84a6e78870 /perllib | |
parent | 1abc3183acb95f83ddbb05fb80ba19b87b047657 (diff) |
[Open311] turn on comment sending for OCC
but only send if the problem as a customer reference and use that as the
external id reference
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/Open311.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm index c48ff2c7a..7c12ee3a1 100644 --- a/perllib/Open311.pm +++ b/perllib/Open311.pm @@ -33,6 +33,7 @@ has use_extended_updates => ( is => 'ro', isa => Bool, default => 0 ); has extended_statuses => ( is => 'ro', isa => Bool, default => 0 ); has always_send_email => ( is => 'ro', isa => Bool, default => 0 ); has multi_photos => ( is => 'ro', isa => Bool, default => 0 ); +has use_customer_reference => ( is => 'ro', isa => Bool, default => 0 ); before [ qw/get_service_list get_service_meta_info get_service_requests get_service_request_updates @@ -368,9 +369,13 @@ sub _populate_service_request_update_params { } } + my $service_request_id = $comment->problem->external_id; + if ( $self->use_customer_reference ) { + $service_request_id = $comment->problem->get_extra_metadata('customer_reference'); + } my $params = { updated_datetime => DateTime::Format::W3CDTF->format_datetime($comment->confirmed->set_nanosecond(0)), - service_request_id => $comment->problem->external_id, + service_request_id => $service_request_id, status => $status, description => $comment->text, last_name => $lastname, |