Skip to content
Snippets Groups Projects
Commit d6474f22 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Preserve created at time of notes when moving issue

parent 797af064
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment