diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-15 14:12:17 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-15 14:12:17 +0000 |
commit | d7b669e50b1c863b748231dc8fb66a692a33cdd1 (patch) | |
tree | 59001bb1ae7cb03a9c8ce92e8ffb9b874c56f4af /app/models/issue_status.rb | |
parent | 54d55a360a21569b4a76070b52177e778d5521c7 (diff) | |
download | redmine-d7b669e50b1c863b748231dc8fb66a692a33cdd1.tar.gz redmine-d7b669e50b1c863b748231dc8fb66a692a33cdd1.zip |
Workflow enhancement: editable and required fields configurable by role, tracker and status (#703, #3521).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9977 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_status.rb')
-rw-r--r-- | app/models/issue_status.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/issue_status.rb b/app/models/issue_status.rb index 6973ca656..2d09d5e88 100644 --- a/app/models/issue_status.rb +++ b/app/models/issue_status.rb @@ -17,10 +17,10 @@ class IssueStatus < ActiveRecord::Base before_destroy :check_integrity - has_many :workflows, :foreign_key => "old_status_id" + has_many :workflows, :class_name => 'WorkflowTransition', :foreign_key => "old_status_id" acts_as_list - before_destroy :delete_workflows + before_destroy :delete_workflow_rules after_save :update_default validates_presence_of :name @@ -98,7 +98,7 @@ private end # Deletes associated workflows - def delete_workflows - Workflow.delete_all(["old_status_id = :id OR new_status_id = :id", {:id => id}]) + def delete_workflow_rules + WorkflowRule.delete_all(["old_status_id = :id OR new_status_id = :id", {:id => id}]) end end |