Commit 74a0e855 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'fix/import-issue-assignees' into 'master'

Fix missing issue assignees

Closes #39170

See merge request gitlab-org/gitlab-ce!15109
parents 46ff7e28 da174194
---
title: Fix missing Import/Export issue assignees
merge_request:
author:
type: fixed
...@@ -19,6 +19,7 @@ project_tree: ...@@ -19,6 +19,7 @@ project_tree:
- milestone: - milestone:
- events: - events:
- :push_event_payload - :push_event_payload
- :issue_assignees
- snippets: - snippets:
- :award_emoji - :award_emoji
- notes: - notes:
......
...@@ -287,3 +287,6 @@ timelogs: ...@@ -287,3 +287,6 @@ timelogs:
- user - user
push_event_payload: push_event_payload:
- event - event
issue_assignees:
- issue
- assignee
\ No newline at end of file
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
"issues": [ "issues": [
{ {
"id": 40, "id": 40,
"title": "Voluptatem amet doloribus deleniti eos maxime repudiandae molestias.", "title": "Voluptatem",
"assignee_id": 1, "assignee_id": 1,
"author_id": 22, "author_id": 22,
"project_id": 5, "project_id": 5,
...@@ -60,6 +60,12 @@ ...@@ -60,6 +60,12 @@
"due_date": null, "due_date": null,
"moved_to_id": null, "moved_to_id": null,
"test_ee_field": "test", "test_ee_field": "test",
"issue_assignees": [
{
"user_id": 1,
"issue_id": 1
}
],
"milestone": { "milestone": {
"id": 1, "id": 1,
"title": "test milestone", "title": "test milestone",
......
...@@ -63,6 +63,10 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do ...@@ -63,6 +63,10 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
expect(issue.reload.updated_at.to_s).to eq('2016-06-14 15:02:47 UTC') expect(issue.reload.updated_at.to_s).to eq('2016-06-14 15:02:47 UTC')
end end
it 'has issue assignees' do
expect(Issue.where(title: 'Voluptatem').first.issue_assignees).not_to be_empty
end
it 'contains the merge access levels on a protected branch' do it 'contains the merge access levels on a protected branch' do
expect(ProtectedBranch.first.merge_access_levels).not_to be_empty expect(ProtectedBranch.first.merge_access_levels).not_to be_empty
end end
......
...@@ -77,6 +77,10 @@ describe Gitlab::ImportExport::ProjectTreeSaver do ...@@ -77,6 +77,10 @@ describe Gitlab::ImportExport::ProjectTreeSaver do
expect(saved_project_json['issues'].first['notes']).not_to be_empty expect(saved_project_json['issues'].first['notes']).not_to be_empty
end end
it 'has issue assignees' do
expect(saved_project_json['issues'].first['issue_assignees']).not_to be_empty
end
it 'has author on issue comments' do it 'has author on issue comments' do
expect(saved_project_json['issues'].first['notes'].first['author']).not_to be_empty expect(saved_project_json['issues'].first['notes'].first['author']).not_to be_empty
end end
......
...@@ -506,3 +506,6 @@ ProjectAutoDevops: ...@@ -506,3 +506,6 @@ ProjectAutoDevops:
- project_id - project_id
- created_at - created_at
- updated_at - updated_at
IssueAssignee:
- user_id
- issue_id
\ No newline at end of file
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