Adds an option of the copy form to enable/disable attachments copy (#3055).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8677 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-01-20 18:22:43 +00:00
parent 8a3623733f
commit fbf30eec7c
49 changed files with 105 additions and 9 deletions
+9 -5
View File
@@ -360,11 +360,15 @@ private
def build_new_issue_from_params
if params[:id].blank?
@issue = Issue.new
begin
@issue.copy_from(params[:copy_from]) if params[:copy_from]
rescue ActiveRecord::RecordNotFound
render_404
return
if params[:copy_from]
begin
@copy_from = Issue.visible.find(params[:copy_from])
@copy_attachments = params[:copy_attachments].present? || request.get?
@issue.copy_from(@copy_from, :attachments => @copy_attachments)
rescue ActiveRecord::RecordNotFound
render_404
return
end
end
@issue.project = @project
else