remove unneeded Relation#all from WorkflowTransition#count_by_tracker_and_role

git-svn-id: http://svn.redmine.org/redmine/trunk@13012 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-03-26 10:38:04 +00:00
parent 2ec3b3694f
commit 92cac9011e
1 changed files with 2 additions and 4 deletions

View File

@ -21,9 +21,8 @@ class WorkflowTransition < WorkflowRule
# Returns workflow transitions count by tracker and role
def self.count_by_tracker_and_role
counts = connection.select_all("SELECT role_id, tracker_id, count(id) AS c FROM #{table_name} WHERE type = 'WorkflowTransition' GROUP BY role_id, tracker_id")
roles = Role.sorted.all
trackers = Tracker.sorted.all
roles = Role.sorted
trackers = Tracker.sorted
result = []
trackers.each do |tracker|
t = []
@ -33,7 +32,6 @@ class WorkflowTransition < WorkflowRule
end
result << [tracker, t]
end
result
end