]> source.dussan.org Git - redmine.git/commitdiff
remove unneeded Relation#all from WorkflowTransition#count_by_tracker_and_role
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 26 Mar 2014 10:38:04 +0000 (10:38 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 26 Mar 2014 10:38:04 +0000 (10:38 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13012 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/workflow_transition.rb

index fb0c31c80cff9d21b759e51f7eb11d1bf74e9fb0..6b04d5983db307922a5c6294569a114884dfff21 100644 (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