From 33f31350658d36e3ce6788c96ef0edd9c3d9a4f4 Mon Sep 17 00:00:00 2001 From: Carsten Otto Date: Sat, 18 Mar 2017 20:19:48 +0100 Subject: [PATCH] show correct number in badge fixes #2058 --- app/controllers/todos_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index 824371578..a50a93962 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -953,7 +953,8 @@ def determine_down_count end from.project do unless @todo.project_id == nil - @down_count = current_user.projects.find(@todo.project_id).todos.active_or_hidden.count + project = current_user.projects.find(@todo.project_id) + @down_count = project.todos.active_or_hidden.count + project.todos.deferred.count + project.todos.pending.count end end from.deferred do