@@ -71,11 +71,11 class IssueRelation < ActiveRecord::Base | |||||
71 | errors.add :issue_to_id, :not_same_project unless issue_from.project_id == issue_to.project_id || Setting.cross_project_issue_relations? |
|
71 | errors.add :issue_to_id, :not_same_project unless issue_from.project_id == issue_to.project_id || Setting.cross_project_issue_relations? | |
72 | #detect circular dependencies depending wether the relation should be reversed |
|
72 | #detect circular dependencies depending wether the relation should be reversed | |
73 | if TYPES.has_key?(relation_type) && TYPES[relation_type][:reverse] |
|
73 | if TYPES.has_key?(relation_type) && TYPES[relation_type][:reverse] | |
74 |
errors.add |
|
74 | errors.add :base, :circular_dependency if issue_from.all_dependent_issues.include? issue_to | |
75 | else |
|
75 | else | |
76 |
errors.add |
|
76 | errors.add :base, :circular_dependency if issue_to.all_dependent_issues.include? issue_from | |
77 | end |
|
77 | end | |
78 |
errors.add |
|
78 | errors.add :base, :cant_link_an_issue_with_a_descendant if issue_from.is_descendant_of?(issue_to) || issue_from.is_ancestor_of?(issue_to) | |
79 | end |
|
79 | end | |
80 | end |
|
80 | end | |
81 |
|
81 |
General Comments 0
You need to be logged in to leave comments.
Login now