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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
2b94034f
Commit
2b94034f
authored
May 27, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
33cc72d1
ae1d8166
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
app/services/issuable/clone/content_rewriter.rb
app/services/issuable/clone/content_rewriter.rb
+1
-0
changelogs/unreleased/57825-moving-an-issue-results-in-broken-image-links-in-comments.yml
...ng-an-issue-results-in-broken-image-links-in-comments.yml
+5
-0
spec/services/issuable/clone/content_rewriter_spec.rb
spec/services/issuable/clone/content_rewriter_spec.rb
+16
-0
No files found.
app/services/issuable/clone/content_rewriter.rb
View file @
2b94034f
...
...
@@ -28,6 +28,7 @@ module Issuable
new_params
=
{
project:
new_entity
.
project
,
noteable:
new_entity
,
note:
rewrite_content
(
new_note
.
note
),
note_html:
nil
,
created_at:
note
.
created_at
,
updated_at:
note
.
updated_at
}
...
...
changelogs/unreleased/57825-moving-an-issue-results-in-broken-image-links-in-comments.yml
0 → 100644
View file @
2b94034f
---
title
:
Resolve moving an issue results in broken image links in comments
merge_request
:
28654
author
:
type
:
fixed
spec/services/issuable/clone/content_rewriter_spec.rb
View file @
2b94034f
...
...
@@ -149,5 +149,21 @@ describe Issuable::Clone::ContentRewriter do
expect
(
new_note
.
author
).
to
eq
(
note
.
author
)
end
end
context
'notes with upload'
do
let
(
:uploader
)
{
build
(
:file_uploader
,
project:
project1
)
}
let
(
:text
)
{
"Simple text with image:
#{
uploader
.
markdown_link
}
"
}
let!
(
:note
)
{
create
(
:note
,
noteable:
original_issue
,
note:
text
,
project:
project1
)
}
it
'rewrites note content correctly'
do
subject
.
execute
new_note
=
new_issue
.
notes
.
first
expect
(
note
.
note
).
to
match
(
/Simple text with image:
#{
FileUploader
::
MARKDOWN_PATTERN
}
/
)
expect
(
new_note
.
note
).
to
match
(
/Simple text with image:
#{
FileUploader
::
MARKDOWN_PATTERN
}
/
)
expect
(
note
.
note
).
not_to
eq
(
new_note
.
note
)
expect
(
note
.
note_html
).
not_to
eq
(
new_note
.
note_html
)
end
end
end
end
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