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:
parent
2ec3b3694f
commit
92cac9011e
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue