diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-20 17:56:28 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-20 17:56:28 +0000 |
commit | 8a3623733fa2ef879bb2a3f4355e0ce0df49b278 (patch) | |
tree | aabdb9f4aa05eff33a8f19551aa1fa8558ebc813 /app/models/issue.rb | |
parent | e347fba11aea87a6bdc9ab6aeaca742d13a8c613 (diff) | |
download | redmine-8a3623733fa2ef879bb2a3f4355e0ce0df49b278.tar.gz redmine-8a3623733fa2ef879bb2a3f4355e0ce0df49b278.zip |
Copy attachments on issue and project copy (#3055).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8676 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index abd2d210a..16257bf83 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -135,6 +135,9 @@ class Issue < ActiveRecord::Base self.custom_field_values = issue.custom_field_values.inject({}) {|h,v| h[v.custom_field_id] = v.value; h} self.status = issue.status self.author = User.current + self.attachments = issue.attachments.map do |attachement| + attachement.copy(:container => self) + end @copied_from = issue self end |