summaryrefslogtreecommitdiffstats
path: root/app/controllers/workflows_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-13 16:55:28 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-13 16:55:28 +0000
commitf731545c619b6e6a641d40f944e45f99aff8185e (patch)
tree5196cbe7aacebce0c87f3a5672733859d44f1765 /app/controllers/workflows_controller.rb
parente52ecb494b00a3e3e98778ac967e71734e15d733 (diff)
downloadredmine-f731545c619b6e6a641d40f944e45f99aff8185e.tar.gz
redmine-f731545c619b6e6a641d40f944e45f99aff8185e.zip
Use a simple count query.
git-svn-id: http://svn.redmine.org/redmine/trunk@13750 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/workflows_controller.rb')
-rw-r--r--app/controllers/workflows_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb
index d00ee03bc..0968977cb 100644
--- a/app/controllers/workflows_controller.rb
+++ b/app/controllers/workflows_controller.rb
@@ -21,7 +21,9 @@ class WorkflowsController < ApplicationController
before_filter :require_admin
def index
- @workflow_counts = WorkflowTransition.count_by_tracker_and_role
+ @roles = Role.sorted.select(&:consider_workflow?)
+ @trackers = Tracker.sorted
+ @workflow_counts = WorkflowTransition.group(:tracker_id, :role_id).count
end
def edit