]> source.dussan.org Git - redmine.git/commitdiff
Only copy visible issues.
authorEric Davis <edavis@littlestreamsoftware.com>
Thu, 29 Apr 2010 23:26:52 +0000 (23:26 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Thu, 29 Apr 2010 23:26:52 +0000 (23:26 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3698 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue.rb

index 4fa072afdfcadb89bf4508add45eb7c2d888eee0..2d002183533a415c6ac1e114f9ef7cb63251ec72 100644 (file)
@@ -92,7 +92,7 @@ class Issue < ActiveRecord::Base
   end
   
   def copy_from(arg)
-    issue = arg.is_a?(Issue) ? arg : Issue.find(arg)
+    issue = arg.is_a?(Issue) ? arg : Issue.visible.find(arg)
     self.attributes = issue.attributes.dup.except("id", "root_id", "parent_id", "lft", "rgt", "created_on", "updated_on")
     self.custom_field_values = issue.custom_field_values.inject({}) {|h,v| h[v.custom_field_id] = v.value; h}
     self.status = issue.status