@@ -175,6 +175,7 class Issue < ActiveRecord::Base | |||
|
175 | 175 | issue.reset_custom_values! |
|
176 | 176 | end |
|
177 | 177 | if options[:copy] |
|
178 | issue.author = User.current | |
|
178 | 179 | issue.custom_field_values = self.custom_field_values.inject({}) {|h,v| h[v.custom_field_id] = v.value; h} |
|
179 | 180 | issue.status = if options[:attributes] && options[:attributes][:status_id] |
|
180 | 181 | IssueStatus.find_by_id(options[:attributes][:status_id]) |
@@ -545,6 +545,13 class IssueTest < ActiveSupport::TestCase | |||
|
545 | 545 | |
|
546 | 546 | assert_equal date, @copy.due_date |
|
547 | 547 | end |
|
548 | ||
|
549 | should "set current user as author" do | |
|
550 | User.current = User.find(9) | |
|
551 | @copy = @issue.move_to_project(Project.find(3), Tracker.find(2), {:copy => true, :attributes => {}}) | |
|
552 | ||
|
553 | assert_equal User.current, @copy.author | |
|
554 | end | |
|
548 | 555 | end |
|
549 | 556 | end |
|
550 | 557 |
General Comments 0
You need to be logged in to leave comments.
Login now