]> source.dussan.org Git - redmine.git/commitdiff
Do not clear issue relations when moving an issue to another project if cross-project...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 21 Feb 2008 17:45:49 +0000 (17:45 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 21 Feb 2008 17:45:49 +0000 (17:45 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1164 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue.rb

index 8dcacde721306c8839030d45744246bc7abf2ef8..6b9b3bd1c5b82025b497902a0fb2e7f7358feb16 100644 (file)
@@ -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