summaryrefslogtreecommitdiffstats
path: root/app/models/workflow_rule.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/workflow_rule.rb')
-rw-r--r--app/models/workflow_rule.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/workflow_rule.rb b/app/models/workflow_rule.rb
index 829b88a32..3d1b75bd0 100644
--- a/app/models/workflow_rule.rb
+++ b/app/models/workflow_rule.rb
@@ -24,6 +24,7 @@ class WorkflowRule < ActiveRecord::Base
belongs_to :new_status, :class_name => 'IssueStatus', :foreign_key => 'new_status_id'
validates_presence_of :role, :tracker, :old_status
+ attr_protected :id
# Copies workflows from source to targets
def self.copy(source_tracker, source_role, target_trackers, target_roles)
@@ -34,7 +35,7 @@ class WorkflowRule < ActiveRecord::Base
target_trackers = [target_trackers].flatten.compact
target_roles = [target_roles].flatten.compact
- target_trackers = Tracker.sorted.all if target_trackers.empty?
+ target_trackers = Tracker.sorted.to_a if target_trackers.empty?
target_roles = Role.all if target_roles.empty?
target_trackers.each do |target_tracker|