summaryrefslogtreecommitdiffstats
path: root/app/models/issue_relation.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-27 19:09:30 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-27 19:09:30 +0000
commitcc4cff9f11b453c6fe308da6867819b4717e8d1a (patch)
treed2677bbc67877f5879a4ff3392e32bcf7c0fbfc0 /app/models/issue_relation.rb
parentc3e055bd700bdcd09c700d20d1c309b55e46a0e8 (diff)
downloadredmine-cc4cff9f11b453c6fe308da6867819b4717e8d1a.tar.gz
redmine-cc4cff9f11b453c6fe308da6867819b4717e8d1a.zip
Adds a "Copied from/to" relation when copying issue(s) (#6899).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10491 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_relation.rb')
-rw-r--r--app/models/issue_relation.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/issue_relation.rb b/app/models/issue_relation.rb
index 2efcfb41a..c145b87b9 100644
--- a/app/models/issue_relation.rb
+++ b/app/models/issue_relation.rb
@@ -26,6 +26,8 @@ class IssueRelation < ActiveRecord::Base
TYPE_BLOCKED = "blocked"
TYPE_PRECEDES = "precedes"
TYPE_FOLLOWS = "follows"
+ TYPE_COPIED_TO = "copied_to"
+ TYPE_COPIED_FROM = "copied_from"
TYPES = { TYPE_RELATES => { :name => :label_relates_to, :sym_name => :label_relates_to, :order => 1, :sym => TYPE_RELATES },
TYPE_DUPLICATES => { :name => :label_duplicates, :sym_name => :label_duplicated_by, :order => 2, :sym => TYPE_DUPLICATED },
@@ -33,7 +35,9 @@ class IssueRelation < ActiveRecord::Base
TYPE_BLOCKS => { :name => :label_blocks, :sym_name => :label_blocked_by, :order => 4, :sym => TYPE_BLOCKED },
TYPE_BLOCKED => { :name => :label_blocked_by, :sym_name => :label_blocks, :order => 5, :sym => TYPE_BLOCKS, :reverse => TYPE_BLOCKS },
TYPE_PRECEDES => { :name => :label_precedes, :sym_name => :label_follows, :order => 6, :sym => TYPE_FOLLOWS },
- TYPE_FOLLOWS => { :name => :label_follows, :sym_name => :label_precedes, :order => 7, :sym => TYPE_PRECEDES, :reverse => TYPE_PRECEDES }
+ TYPE_FOLLOWS => { :name => :label_follows, :sym_name => :label_precedes, :order => 7, :sym => TYPE_PRECEDES, :reverse => TYPE_PRECEDES },
+ TYPE_COPIED_TO => { :name => :label_copied_to, :sym_name => :label_copied_from, :order => 8, :sym => TYPE_COPIED_FROM },
+ TYPE_COPIED_FROM => { :name => :label_copied_from, :sym_name => :label_copied_to, :order => 9, :sym => TYPE_COPIED_TO, :reverse => TYPE_COPIED_TO }
}.freeze
validates_presence_of :issue_from, :issue_to, :relation_type