From 948097bc4d0f3a5163a9f464169790fee9b421cd Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 21 Feb 2008 17:45:49 +0000 Subject: [PATCH] Do not clear issue relations when moving an issue to another project if cross-project issue relations are allowed (closes #696). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1164 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 8dcacde72..6b9b3bd1c 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -66,8 +66,10 @@ class Issue < ActiveRecord::Base transaction do if new_project && project_id != new_project.id # delete issue relations - self.relations_from.clear - self.relations_to.clear + unless Setting.cross_project_issue_relations? + self.relations_from.clear + self.relations_to.clear + end # issue is moved to another project self.category = nil self.fixed_version = nil -- 2.39.5