From: Jean-Philippe Lang Date: Thu, 21 Feb 2008 17:45:49 +0000 (+0000) Subject: Do not clear issue relations when moving an issue to another project if cross-project... X-Git-Tag: 0.7.0-RC1~123 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=948097bc4d0f3a5163a9f464169790fee9b421cd;p=redmine.git 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 --- 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