diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-06-26 12:19:32 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-06-26 12:20:56 +0100 |
commit | 3dd1d1f2cb68b731d23ecea9eb580fe08a190ce8 (patch) | |
tree | 318490dac2acd4ade4e4fa8b1e86fb01359beb5f | |
parent | 62b19194a099e6e5ac1140aea0ed42744cdff786 (diff) |
[Open311] Remove update problem matching warning.
Lots of false positives from other bodies too.
-rw-r--r-- | perllib/Open311/GetServiceRequestUpdates.pm | 6 | ||||
-rw-r--r-- | t/open311/getservicerequestupdates.t | 6 |
2 files changed, 1 insertions, 11 deletions
diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm index c0da7793f..3d593a4eb 100644 --- a/perllib/Open311/GetServiceRequestUpdates.pm +++ b/perllib/Open311/GetServiceRequestUpdates.pm @@ -104,7 +104,6 @@ sub update_comments { next if @args && ($updated lt $args[0] || $updated gt $args[1]); my $problem; - my $match_field = 'external_id'; my $criteria = { external_id => $request_id, }; @@ -119,7 +118,6 @@ sub update_comments { $criteria = { id => $request->{fixmystreet_id}, }; - $match_field = 'fixmystreet id'; } $problem = $self->schema->resultset('Problem')->to_body($body)->search( $criteria ); @@ -221,10 +219,6 @@ sub update_comments { } } } - # we get lots of comments that are not related to FMS issues from Lewisham so ignore those otherwise - # way too many warnings. - } elsif (FixMyStreet->config('STAGING_SITE') and $body->name !~ /Lewisham/) { - warn "Failed to match comment to problem with $match_field $request_id for " . $body->name . "\n"; } } diff --git a/t/open311/getservicerequestupdates.t b/t/open311/getservicerequestupdates.t index 3cb2fda69..32f1ec2ee 100644 --- a/t/open311/getservicerequestupdates.t +++ b/t/open311/getservicerequestupdates.t @@ -1108,11 +1108,7 @@ subtest 'check matching on fixmystreet_id overrides service_request_id' => sub { system_user => $user, ); - warning_like { - $update->update_comments( $o, $bodies{2482} ) - } - qr/Failed to match comment to problem with fixmystreet id @{[$problem->external_id]} for Bromley/, - "warning emitted for bad fixmystreet id"; + $update->update_comments( $o, $bodies{2482} ); $problem->discard_changes; is $problem->comments->count, 2, 'two comments after fetching updates'; |