Skip to content

Commit c513434

Browse files
author
Mayra Cabrera
committedMay 20, 2019
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
2 parents ec79a0a + e938d24 commit c513434

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Fix diff notes and discussion notes being exported as regular notes
3+
merge_request: 28401
4+
author:
5+
type: fixed

‎lib/gitlab/import_export/import_export.yml

+2
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ excluded_attributes:
176176
- :enabled
177177

178178
methods:
179+
notes:
180+
- :type
179181
labels:
180182
- :type
181183
label:

‎spec/lib/gitlab/import_export/project_tree_saver_spec.rb

+5-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@
9191
end
9292

9393
it 'has issue comments' do
94-
expect(saved_project_json['issues'].first['notes']).not_to be_empty
94+
notes = saved_project_json['issues'].first['notes']
95+
96+
expect(notes).not_to be_empty
97+
expect(notes.first['type']).to eq('DiscussionNote')
9598
end
9699

97100
it 'has issue assignees' do
@@ -299,7 +302,7 @@ def setup_project
299302
create(:commit_status, project: project, pipeline: ci_build.pipeline)
300303

301304
create(:milestone, project: project)
302-
create(:note, noteable: issue, project: project)
305+
create(:discussion_note, noteable: issue, project: project)
303306
create(:note, noteable: merge_request, project: project)
304307
create(:note, noteable: snippet, project: project)
305308
create(:note_on_commit,

0 commit comments

Comments
 (0)
Please sign in to comment.