Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
d6474f22
Commit
d6474f22
authored
Mar 20, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preserve created at time of notes when moving issue
parent
797af064
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
app/services/issues/move_service.rb
app/services/issues/move_service.rb
+2
-1
spec/services/issues/move_service_spec.rb
spec/services/issues/move_service_spec.rb
+5
-0
No files found.
app/services/issues/move_service.rb
View file @
d6474f22
...
...
@@ -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
...
...
spec/services/issues/move_service_spec.rb
View file @
d6474f22
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment