diff options
author | Dave Arter <davea@mysociety.org> | 2017-02-20 11:00:48 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2017-02-20 11:00:48 +0000 |
commit | ba1977c735cf7b8968c156707b8d10ac0d38c2af (patch) | |
tree | fee7f8688eb7d4933ad6058aec9d2e18f9e499d3 | |
parent | 53f8f462ab0d1772803516305da91fa2d622f1be (diff) | |
parent | 5414433c85749c2baed87c3e6ba4a60bc8103577 (diff) |
Merge branch 'issues/forcouncils/168-stateful-sending-solution'
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin/ExorDefects.pm | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/Script/Reports.pm | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 11bdca805..a7b9fb169 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -78,7 +78,7 @@ sub index : Path : Args(0) { $c->forward('stats_by_state'); my @unsent = $c->cobrand->problems->search( { - state => [ 'confirmed' ], + state => [ FixMyStreet::DB::Result::Problem::open_states() ], whensent => undef, bodies_str => { '!=', undef }, } )->all; diff --git a/perllib/FixMyStreet/App/Controller/Admin/ExorDefects.pm b/perllib/FixMyStreet/App/Controller/Admin/ExorDefects.pm index 164a4b42d..013d710af 100644 --- a/perllib/FixMyStreet/App/Controller/Admin/ExorDefects.pm +++ b/perllib/FixMyStreet/App/Controller/Admin/ExorDefects.pm @@ -57,6 +57,7 @@ sub download : Path('download') : Args(0) { my %params = ( -and => [ state => [ 'action scheduled' ], + external_id => { '!=' => undef }, 'admin_log_entries.action' => 'inspected', 'admin_log_entries.whenedited' => { '>=', $start_date }, 'admin_log_entries.whenedited' => { '<=', $end_date + $one_day }, diff --git a/perllib/FixMyStreet/Script/Reports.pm b/perllib/FixMyStreet/Script/Reports.pm index a7f3cb84b..6057807de 100644 --- a/perllib/FixMyStreet/Script/Reports.pm +++ b/perllib/FixMyStreet/Script/Reports.pm @@ -28,7 +28,7 @@ sub send(;$) { my $base_url = FixMyStreet->config('BASE_URL'); my $site = $site_override || CronFns::site($base_url); - my $states = [ 'confirmed', 'fixed' ]; + my $states = [ FixMyStreet::DB::Result::Problem::open_states() ]; $states = [ 'unconfirmed', 'confirmed', 'in progress', 'planned', 'closed', 'investigating' ] if $site eq 'zurich'; my $unsent = $rs->search( { state => $states, @@ -274,7 +274,7 @@ sub send(;$) { } my $sending_errors = ''; my $unsent = $rs->search( { - state => [ 'confirmed', 'fixed' ], + state => [ FixMyStreet::DB::Result::Problem::open_states() ], whensent => undef, bodies_str => { '!=', undef }, send_fail_count => { '>', 0 } |