From 87cc39d560c5ec3d6ec6b44429b966210252fb19 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 2 Oct 2012 13:01:28 +0100 Subject: do not used planned status but use new action scheduled instead NB: planned still listed in some places to account for old reports some test coverage improvements --- perllib/FixMyStreet/App/Controller/Dashboard.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perllib/FixMyStreet/App/Controller/Dashboard.pm') diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm index e4266dc64..11792ed9f 100644 --- a/perllib/FixMyStreet/App/Controller/Dashboard.pm +++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm @@ -181,11 +181,11 @@ sub updates_search : Private { map { $_ => $counts{$_} || 0 } ('confirmed', 'investigating', 'in progress', 'closed', 'fixed - council', 'fixed - user', 'fixed', 'unconfirmed', 'hidden', - 'partial', 'planned'); + 'partial', 'action scheduled'); for my $vars ( [ 'time_to_fix', 'fixed - council' ], - [ 'time_to_mark', 'in progress', 'planned', 'investigating', 'closed' ], + [ 'time_to_mark', 'in progress', 'action scheduled', 'investigating', 'closed' ], ) { my $col = shift @$vars; my $substmt = "select min(id) from comment where me.problem_id=comment.problem_id and problem_state in ('" -- cgit v1.2.3 From ec4d95d09887e3aebf25eaaa3de3d7ddf26f706d Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 2 Oct 2012 13:51:45 +0100 Subject: count planned and action scheduled as the same in the dashboard --- perllib/FixMyStreet/App/Controller/Dashboard.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/App/Controller/Dashboard.pm') diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm index 11792ed9f..b52e682a5 100644 --- a/perllib/FixMyStreet/App/Controller/Dashboard.pm +++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm @@ -138,6 +138,8 @@ sub index : Path : Args(0) { $prob_where->{state} = [ FixMyStreet::DB::Result::Problem->fixed_states() ]; } elsif ( $c->stash->{q_state} ) { $prob_where->{state} = $c->stash->{q_state}; + $prob_where->{state} = { IN => [ 'planned', 'action scheduled' ] } + if $prob_where->{state} eq 'action scheduled'; } my $params = { %$prob_where, @@ -181,7 +183,9 @@ sub updates_search : Private { map { $_ => $counts{$_} || 0 } ('confirmed', 'investigating', 'in progress', 'closed', 'fixed - council', 'fixed - user', 'fixed', 'unconfirmed', 'hidden', - 'partial', 'action scheduled'); + 'partial', 'action scheduled', 'planned'); + + $counts{'action scheduled'} += $counts{planned} || 0; for my $vars ( [ 'time_to_fix', 'fixed - council' ], -- cgit v1.2.3