Fixed MissingFeatureException: let user choose to copy attachments or not when bulk copying issues.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9405 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-04-14 06:21:03 +00:00
parent 09375960d6
commit 231282ddcb
4 changed files with 57 additions and 4 deletions
+4 -1
View File
@@ -235,6 +235,9 @@ class IssuesController < ApplicationController
@trackers = target_projects.map(&:trackers).reduce(:&)
@versions = target_projects.map {|p| p.shared_versions.open}.reduce(:&)
@categories = target_projects.map {|p| p.issue_categories}.reduce(:&)
if @copy
@attachments_present = @issues.detect {|i| i.attachments.any?}.present?
end
@safe_attributes = @issues.map(&:safe_attribute_names).reduce(:&)
render :layout => false if request.xhr?
@@ -250,7 +253,7 @@ class IssuesController < ApplicationController
@issues.each do |issue|
issue.reload
if @copy
issue = issue.copy
issue = issue.copy({}, :attachments => params[:copy_attachments].present?)
end
journal = issue.init_journal(User.current, params[:notes])
issue.safe_attributes = attributes