aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/send-comments13
1 files changed, 10 insertions, 3 deletions
diff --git a/bin/send-comments b/bin/send-comments
index 7043df7b8..55c9da62b 100755
--- a/bin/send-comments
+++ b/bin/send-comments
@@ -48,9 +48,6 @@ while ( my $body = $bodies->next ) {
# XXX Cobrand specific - see also list in Problem->updates_sent_to_body
if ($site eq 'fixmystreet.com') {
- # Oxfordshire (OCC) is special:
- # we do *receive* service_request_updates (aka comments) for OCC, but we never *send* them, so skip this pass
- next if $body->areas->{+COUNCIL_ID_OXFORDSHIRE};
# Lewisham does not yet accept updates
next if $body->areas->{+COUNCIL_ID_LEWISHAM};
}
@@ -83,6 +80,9 @@ while ( my $body = $bodies->next ) {
use_extended_updates => $use_extended,
);
+ if ( $body->areas->{+COUNCIL_ID_OXFORDSHIRE} ) {
+ $open311_conf{use_customer_reference} = 1,
+ }
if ( $body->send_extended_statuses ) {
$open311_conf{extended_statuses} = 1;
@@ -111,6 +111,13 @@ while ( my $body = $bodies->next ) {
next;
}
+ # Oxfordshire stores the external id of the problem as a customer reference
+ # in metadata
+ if ($body->areas->{+COUNCIL_ID_OXFORDSHIRE} &&
+ !$comment->problem->get_extra_metadata('customer_reference') ) {
+ next;
+ }
+
# TODO actually this should be OK for any devolved endpoint if original Open311->can_be_devolved, presumably
if ( 0 ) { # Check can_be_devolved and do this properly if set
my $sender = $cobrand->get_body_sender( $body, $comment->problem->category );