diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-05-23 07:08:53 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-05-23 07:08:53 +0000 |
commit | 09b935b44ed897afc3f0abcc614558bf6356b6ba (patch) | |
tree | 52d08b1b6e703b677f59c4ed3517bb0b8cdcadf0 /app | |
parent | 24d6211f4e4b2979693fdc8826c9d0b09ac510d6 (diff) | |
download | redmine-09b935b44ed897afc3f0abcc614558bf6356b6ba.tar.gz redmine-09b935b44ed897afc3f0abcc614558bf6356b6ba.zip |
Fixed that copying issues always copy subtasks and attachments even if option is unchecked (#11787).
git-svn-id: http://svn.redmine.org/redmine/trunk@14268 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/issues_controller.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 4525aa390..2f7aa5315 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -248,7 +248,10 @@ class IssuesController < ApplicationController def bulk_update @issues.sort! @copy = params[:copy].present? + attributes = parse_params_for_bulk_issue_attributes(params) + copy_subtasks = (params[:copy_subtasks] == '1') + copy_attachments = (params[:copy_attachments] == '1') if @copy unless User.current.allowed_to?(:copy_issues, @projects) @@ -266,7 +269,7 @@ class IssuesController < ApplicationController unsaved_issues = [] saved_issues = [] - if @copy && params[:copy_subtasks].present? + if @copy && copy_subtasks # Descendant issues will be copied with the parent task # Don't copy them twice @issues.reject! {|issue| @issues.detect {|other| issue.is_descendant_of?(other)}} @@ -276,8 +279,8 @@ class IssuesController < ApplicationController orig_issue.reload if @copy issue = orig_issue.copy({}, - :attachments => params[:copy_attachments].present?, - :subtasks => params[:copy_subtasks].present?, + :attachments => copy_attachments, + :subtasks => copy_subtasks, :link => link_copy?(params[:link_copy]) ) else |