mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-19 09:36:47 +10:00
Preserve created at time of notes when moving issue
This commit is contained in:
@@ -53,7 +53,8 @@ module Issues
|
||||
@old_issue.notes.find_each do |note|
|
||||
new_note = note.dup
|
||||
new_params = { project: @new_project, noteable: @new_issue,
|
||||
note: unfold_references(new_note.note) }
|
||||
note: unfold_references(new_note.note),
|
||||
created_at: note.created_at }
|
||||
|
||||
new_note.update(new_params)
|
||||
end
|
||||
|
||||
@@ -121,6 +121,11 @@ describe Issues::MoveService, services: true do
|
||||
it 'preserves orignal author of comment' do
|
||||
expect(user_notes.pluck(:author_id)).to all(eq(author.id))
|
||||
end
|
||||
|
||||
it 'preserves time when note has been created at' do
|
||||
expect(old_issue.notes.first.created_at)
|
||||
.to eq new_issue.notes.first.created_at
|
||||
end
|
||||
end
|
||||
|
||||
context 'notes with references' do
|
||||
|
||||
Reference in New Issue
Block a user