From b0e62e37aebe2de8a195a6b989a7d886286483ae Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 28 Sep 2008 13:10:00 +0000 Subject: [PATCH] Fixes Workflow.count_by_tracker_and_role. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1917 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/workflow.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/workflow.rb b/app/models/workflow.rb index e254ac48c..4168fdea0 100644 --- a/app/models/workflow.rb +++ b/app/models/workflow.rb @@ -32,7 +32,7 @@ class Workflow < ActiveRecord::Base trackers.each do |tracker| t = [] roles.each do |role| - row = counts.detect {|c| c['role_id'] == role.id.to_s && c['tracker_id'] = tracker.id.to_s} + row = counts.detect {|c| c['role_id'] == role.id.to_s && c['tracker_id'] == tracker.id.to_s} t << [role, (row.nil? ? 0 : row['c'].to_i)] end result << [tracker, t] -- 2.39.5