Added an option to be able to relate issues in different projects.

It can be set in Admin -> Settings (default: false).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@620 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-08-12 15:31:04 +00:00
parent cf4e216502
commit 79b8bd0a38
16 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ class IssueRelation < ActiveRecord::Base
def validate
if issue_from && issue_to
errors.add :issue_to_id, :activerecord_error_invalid if issue_from_id == issue_to_id
errors.add :issue_to_id, :activerecord_error_not_same_project unless issue_from.project_id == issue_to.project_id
errors.add :issue_to_id, :activerecord_error_not_same_project unless issue_from.project_id == issue_to.project_id || Setting.cross_project_issue_relations?
errors.add_to_base :activerecord_error_circular_dependency if issue_to.all_dependent_issues.include? issue_from
end
end