mirror of
https://github.com/redmine/redmine.git
synced 2025-11-12 00:06:01 +01:00
Clear subtask assignee during copy if is locked (#28946).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17390 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1642,6 +1642,7 @@ class Issue < ActiveRecord::Base
|
||||
copy.project = project
|
||||
copy.parent_issue_id = copied_issue_ids[child.parent_id]
|
||||
copy.fixed_version_id = nil unless child.fixed_version.present? && child.fixed_version.status == 'open'
|
||||
copy.assigned_to = nil unless child.assigned_to_id.present? && child.assigned_to.status == User::STATUS_ACTIVE
|
||||
unless copy.save
|
||||
logger.error "Could not copy subtask ##{child.id} while copying ##{@copied_from.id} to ##{id} due to validation errors: #{copy.errors.full_messages.join(', ')}" if logger
|
||||
next
|
||||
|
||||
Reference in New Issue
Block a user