diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-04-29 23:26:52 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-04-29 23:26:52 +0000 |
commit | 7ccdaee1109fb83cbd80c85fb9fc969f05ec2bea (patch) | |
tree | 7f6395a47e2fb9d2f5811e16990d4fd690dbf282 | |
parent | 488879d9cf63c608bff61ead48b4d55de244b4a4 (diff) | |
download | redmine-7ccdaee1109fb83cbd80c85fb9fc969f05ec2bea.tar.gz redmine-7ccdaee1109fb83cbd80c85fb9fc969f05ec2bea.zip |
Only copy visible issues.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3698 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/models/issue.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 4fa072afd..2d0021835 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -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 |