diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-04-26 09:50:29 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-04-26 09:50:29 +0100 |
commit | 61e130783830050ac35093ad49c5fb2c75f12257 (patch) | |
tree | a85d249f28de62c1126ca47f3b4543fea50acdff /bin | |
parent | a3c652242ba95fa7c952cac1b836b154116db690 (diff) |
Send email to Zurich DM when report in planned state after more than six days.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/zurich-overdue-alert | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/zurich-overdue-alert b/bin/zurich-overdue-alert index 3ba8b9163..4a507c481 100755 --- a/bin/zurich-overdue-alert +++ b/bin/zurich-overdue-alert @@ -24,14 +24,15 @@ my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker('zurich')->new(); my %bodies = map { $_->id => $_ } FixMyStreet::App->model("DB::Body")->all; loop_through( 'alert-moderation-overdue.txt', 0, 1, [ 'unconfirmed', 'confirmed' ] ); -loop_through( 'alert-overdue.txt', 1, 5, 'in progress' ); +loop_through( 'alert-overdue.txt', 1, 6, 'in progress' ); +loop_through( 'alert-overdue.txt', 0, 6, 'planned' ); sub loop_through { my ( $template, $include_parent, $days, $states ) = @_; my $reports = FixMyStreet::App->model("DB::Problem")->search( { state => $states, - whensent => { '<', FixMyStreet::Cobrand::Zurich::sub_days( $now, $days ) }, + created => { '<', FixMyStreet::Cobrand::Zurich::sub_days( $now, $days ) }, bodies_str => { '!=', undef }, } ); |