Include type to notes import / export
This commit is contained in:
parent
f7ebea045b
commit
e938d241ea
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Fix diff notes and discussion notes being exported as regular notes
|
||||||
|
merge_request: 28401
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -176,6 +176,8 @@ excluded_attributes:
|
||||||
- :enabled
|
- :enabled
|
||||||
|
|
||||||
methods:
|
methods:
|
||||||
|
notes:
|
||||||
|
- :type
|
||||||
labels:
|
labels:
|
||||||
- :type
|
- :type
|
||||||
label:
|
label:
|
||||||
|
|
|
@ -91,7 +91,10 @@ describe Gitlab::ImportExport::ProjectTreeSaver do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has issue comments' do
|
it 'has issue comments' do
|
||||||
expect(saved_project_json['issues'].first['notes']).not_to be_empty
|
notes = saved_project_json['issues'].first['notes']
|
||||||
|
|
||||||
|
expect(notes).not_to be_empty
|
||||||
|
expect(notes.first['type']).to eq('DiscussionNote')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has issue assignees' do
|
it 'has issue assignees' do
|
||||||
|
@ -299,7 +302,7 @@ describe Gitlab::ImportExport::ProjectTreeSaver do
|
||||||
create(:commit_status, project: project, pipeline: ci_build.pipeline)
|
create(:commit_status, project: project, pipeline: ci_build.pipeline)
|
||||||
|
|
||||||
create(:milestone, project: project)
|
create(:milestone, project: project)
|
||||||
create(:note, noteable: issue, project: project)
|
create(:discussion_note, noteable: issue, project: project)
|
||||||
create(:note, noteable: merge_request, project: project)
|
create(:note, noteable: merge_request, project: project)
|
||||||
create(:note, noteable: snippet, project: project)
|
create(:note, noteable: snippet, project: project)
|
||||||
create(:note_on_commit,
|
create(:note_on_commit,
|
||||||
|
|
Loading…
Reference in New Issue