From ca1958972eef844aa280d5f7348a685ea11c3de5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 6 Jan 2012 20:06:25 +0000 Subject: [PATCH] Code cleanup. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8525 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index f43ff0d83..7cf20d799 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -132,6 +132,7 @@ class Issue < ActiveRecord::Base self.attributes = issue.attributes.dup.except("id", "root_id", "parent_id", "lft", "rgt", "created_on", "updated_on") self.custom_field_values = issue.custom_field_values.inject({}) {|h,v| h[v.custom_field_id] = v.value; h} self.status = issue.status + self.author = User.current self end @@ -153,21 +154,9 @@ class Issue < ActiveRecord::Base issue.init_journal(User.current, options[:notes]) end - if new_project && issue.project_id != new_project.id - issue.project = new_project - end + issue.project = new_project if new_tracker issue.tracker = new_tracker - issue.reset_custom_values! - end - if options[:copy] - issue.author = User.current - issue.custom_field_values = self.custom_field_values.inject({}) {|h,v| h[v.custom_field_id] = v.value; h} - issue.status = if options[:attributes] && options[:attributes][:status_id] - IssueStatus.find_by_id(options[:attributes][:status_id]) - else - self.status - end end # Allow bulk setting of attributes on the issue if options[:attributes] -- 2.39.5