From 244931dd52f1446a0b32e0a5de9155c2828faba3 Mon Sep 17 00:00:00 2001 From: Nik Gupta Date: Mon, 10 Jun 2024 13:30:42 +0100 Subject: [PATCH] [Northumberland] Skip sending updates on reports fetched from Alloy. And remove the code that accidentally set this up on the Northamptonshire cobrand. --- perllib/FixMyStreet/Cobrand/Northamptonshire.pm | 4 ---- perllib/FixMyStreet/Cobrand/Northumberland.pm | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm index 9ff0fd39edf..516ac73ed7e 100644 --- a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm +++ b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm @@ -135,10 +135,6 @@ sub should_skip_sending_update { return 1; } - if ($self->is_defect($p)) { - return 1; - } - my $move = DateTime->new(year => 2022, month => 9, day => 12, hour => 9, minute => 30, time_zone => FixMyStreet->local_time_zone); return 1 if $p->whensent < $move; diff --git a/perllib/FixMyStreet/Cobrand/Northumberland.pm b/perllib/FixMyStreet/Cobrand/Northumberland.pm index 213cab4c9da..df0362d733c 100644 --- a/perllib/FixMyStreet/Cobrand/Northumberland.pm +++ b/perllib/FixMyStreet/Cobrand/Northumberland.pm @@ -41,6 +41,11 @@ sub disambiguate_location { sub admin_user_domain { 'northumberland.gov.uk' } +sub is_defect { + my ($self, $p) = @_; + return $p->service eq 'Open311'; +} + =item * The default map zoom is a bit more zoomed-in =cut @@ -208,6 +213,16 @@ sub dashboard_export_problems_add_columns { }); } +=item * Updates on reports fetched from Alloy are not sent. + +=cut + +sub should_skip_sending_update { + my ($self, $comment) = @_; + my $p = $comment->problem; + return $self->is_defect($p); +} + =back =cut