diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-04 17:37:03 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-04 17:37:03 +0000 |
commit | a8e5ba00077b78b02f0e1449d89d93c4a79c6850 (patch) | |
tree | d529382949d9c8714069def723eadd5488332fb3 /app/controllers/projects_controller.rb | |
parent | df412551058c0ca442346e4671ef2ae4c6a9a857 (diff) | |
download | redmine-a8e5ba00077b78b02f0e1449d89d93c4a79c6850.tar.gz redmine-a8e5ba00077b78b02f0e1449d89d93c4a79c6850.zip |
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9905 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r-- | app/controllers/projects_controller.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 492e31795..ffb932f34 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -156,12 +156,8 @@ class ProjectsController < ApplicationController cond = @project.project_condition(Setting.display_subprojects_issues?) - @open_issues_by_tracker = Issue.visible.count(:group => :tracker, - :include => [:project, :status, :tracker], - :conditions => ["(#{cond}) AND #{IssueStatus.table_name}.is_closed=?", false]) - @total_issues_by_tracker = Issue.visible.count(:group => :tracker, - :include => [:project, :status, :tracker], - :conditions => cond) + @open_issues_by_tracker = Issue.visible.open.where(cond).count(:group => :tracker) + @total_issues_by_tracker = Issue.visible.where(cond).count(:group => :tracker) if User.current.allowed_to?(:view_time_entries, @project) @total_hours = TimeEntry.visible.sum(:hours, :include => :project, :conditions => cond).to_f |