summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-06 20:06:25 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-06 20:06:25 +0000
commitca1958972eef844aa280d5f7348a685ea11c3de5 (patch)
tree5a9ae65dbe400ffc70d6f88132f40e73343a27dd
parentb3c678da871332480526df6ec280f57730f09603 (diff)
downloadredmine-ca1958972eef844aa280d5f7348a685ea11c3de5.tar.gz
redmine-ca1958972eef844aa280d5f7348a685ea11c3de5.zip
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8525 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/issue.rb15
1 files 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]