diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-27 22:27:37 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-27 22:27:37 +0000 |
commit | f1fdbf8d80d9867d707b48e0118089c201a3ced7 (patch) | |
tree | c6a8b53869705b4bd00c04eaa9c0dd270565f38e /app/models/issue.rb | |
parent | f58ed6c206743c5217b829c5169bb2b302b8b127 (diff) | |
download | redmine-f1fdbf8d80d9867d707b48e0118089c201a3ced7.tar.gz redmine-f1fdbf8d80d9867d707b48e0118089c201a3ced7.zip |
Do not link copied issues when copying a project (#6899).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10495 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 0d226455d..b44154340 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1017,7 +1017,7 @@ class Issue < ActiveRecord::Base def after_create_from_copy return unless copy? && !@after_create_from_copy_handled - if @copied_from.project_id == project_id || Setting.cross_project_issue_relations? + if (@copied_from.project_id == project_id || Setting.cross_project_issue_relations?) && @copy_options[:link] != false relation = IssueRelation.new(:issue_from => @copied_from, :issue_to => self, :relation_type => IssueRelation::TYPE_COPIED_TO) unless relation.save logger.error "Could not create relation while copying ##{@copied_from.id} to ##{id} due to validation errors: #{relation.errors.full_messages.join(', ')}" if logger |