aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-05-24 15:32:01 +0100
committerStruan Donald <struan@exo.org.uk>2012-05-24 15:32:01 +0100
commitf4e2d66889a825d13ad4af6e8ad9168ceb7024b7 (patch)
tree047ad5d3018286a562542d1d30d2fe8483da1378
parent0b407b081762ffcb4ab3be666c7b12f67f9d4a4f (diff)
problem_status is only set for council user updates so check for
mark_fixed and null problem_status to identify user - fixed updates
-rw-r--r--perllib/FixMyStreet/App/Controller/Dashboard.pm2
-rw-r--r--t/app/controller/dashboard.t2
2 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm
index 0fd6cbb98..e4266dc64 100644
--- a/perllib/FixMyStreet/App/Controller/Dashboard.pm
+++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm
@@ -208,7 +208,7 @@ sub updates_search : Private {
}
$counts{fixed_user} = $c->model('DB::Comment')->search(
- { %$params, mark_fixed => 1, 'problem_state' => { IN => [ 'fixed - user', 'fixed' ] } }, { join => 'problem' }
+ { %$params, mark_fixed => 1, problem_state => undef }, { join => 'problem' }
)->count;
$params = {
diff --git a/t/app/controller/dashboard.t b/t/app/controller/dashboard.t
index b477c03bf..7033fa02c 100644
--- a/t/app/controller/dashboard.t
+++ b/t/app/controller/dashboard.t
@@ -591,7 +591,7 @@ sub make_problem {
problem => $p,
user_id => $p_user->id,
state => 'confirmed',
- problem_state => $args->{state},
+ problem_state => $args->{state} =~ /^fixed - user|fixed$/ ? undef : $args->{state},
confirmed => $args->{mark_dt},
text => 'an update',
mark_fixed => $args->{state} =~ /fixed/ ? 1 : 0,