Skip to content

Commit

Permalink
[Merton] Only look at reports already sent to Echo.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Aug 16, 2024
1 parent c90919b commit 090c9cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions perllib/FixMyStreet/Script/Merton/SendWaste.pm
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ sub _problems {
my $self = shift;
FixMyStreet::DB->resultset('Problem')->to_body($self->body->id)->search({
state => { -not_in => [ FixMyStreet::DB::Result::Problem::hidden_states ] },
external_id => { '!=' => undef },
cobrand_data => 'waste',
cobrand => 'merton',
-not => { extra => { '\?' => 'sent_to_crimson' } },
Expand Down
4 changes: 3 additions & 1 deletion t/app/controller/waste_merton.t
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ FixMyStreet::override_config {
cobrand_data => 'waste',
state => 'confirmed',
category => $no_echo_contact->category,
external_id => 'no_echo',
});
$no_echo_report->set_extra_metadata(no_echo => 1);
$no_echo_report->update;
Expand All @@ -201,7 +202,8 @@ FixMyStreet::override_config {

$no_echo_report->discard_changes;
is $no_echo_report->get_extra_metadata('sent_to_crimson'), 1;
is $no_echo_report->external_id, "360";
is $no_echo_report->get_extra_metadata('crimson_external_id'), 360;
is $no_echo_report->external_id, "no_echo";
$no_echo_report->delete;
};
};
Expand Down

0 comments on commit 090c9cd

Please sign in to comment.