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
This commit is contained in:
Jean-Philippe Lang committed 2012-07-15 14:12:17 +00:00
1 parent 54d55a360a
commit d7b669e50b
35 files changed
+1405 -431

No files matched your search

+4 -4
View File
@@ -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