Commit c513434c authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '49517-fix-notes-import-export' into 'master'

Include type to notes import / export

Closes #49517

See merge request gitlab-org/gitlab-ce!28401
parents ec79a0a2 e938d241
---
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
methods:
notes:
- :type
labels:
- :type
label:
......
......@@ -91,7 +91,10 @@ describe Gitlab::ImportExport::ProjectTreeSaver do
end
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
it 'has issue assignees' do
......@@ -299,7 +302,7 @@ describe Gitlab::ImportExport::ProjectTreeSaver do
create(:commit_status, project: project, pipeline: ci_build.pipeline)
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: snippet, project: project)
create(:note_on_commit,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment