Commit 01d38b02 authored by Valery Sizov's avatar Valery Sizov

[Multiple issue asignees] fix importers and specs for them

parent d0b64118
......@@ -122,15 +122,15 @@ module Gitlab
author_id = user_info(bug['ixPersonOpenedBy'])[:gitlab_id] || project.creator_id
issue = Issue.create!(
iid: bug['ixBug'],
project_id: project.id,
title: bug['sTitle'],
description: body,
author_id: author_id,
assignee_id: assignee_id,
state: bug['fOpen'] == 'true' ? 'opened' : 'closed',
created_at: date,
updated_at: DateTime.parse(bug['dtLastUpdated'])
iid: bug['ixBug'],
project_id: project.id,
title: bug['sTitle'],
description: body,
author_id: author_id,
assignee_ids: [assignee_id],
state: bug['fOpen'] == 'true' ? 'opened' : 'closed',
created_at: date,
updated_at: DateTime.parse(bug['dtLastUpdated'])
)
issue_labels = ::LabelsFinder.new(nil, project_id: project.id, title: labels).execute(skip_authorization: true)
......
......@@ -10,7 +10,7 @@ module Gitlab
description: description,
state: state,
author_id: author_id,
assignee_id: assignee_id,
assignee_ids: [assignee_id],
created_at: raw_data.created_at,
updated_at: raw_data.updated_at
}
......
......@@ -92,13 +92,13 @@ module Gitlab
end
issue = Issue.create!(
iid: raw_issue['id'],
project_id: project.id,
title: raw_issue['title'],
description: body,
author_id: project.creator_id,
assignee_id: assignee_id,
state: raw_issue['state'] == 'closed' ? 'closed' : 'opened'
iid: raw_issue['id'],
project_id: project.id,
title: raw_issue['title'],
description: body,
author_id: project.creator_id,
assignee_ids: [assignee_id],
state: raw_issue['state'] == 'closed' ? 'closed' : 'opened'
)
issue_labels = ::LabelsFinder.new(nil, project_id: project.id, title: labels).execute(skip_authorization: true)
......
......@@ -49,7 +49,7 @@ describe Gitlab::GoogleCodeImport::Importer, lib: true do
expect(issue).not_to be_nil
expect(issue.iid).to eq(169)
expect(issue.author).to eq(project.creator)
expect(issue.assignee).to eq(mapped_user)
expect(issue.assignees).to eq([mapped_user])
expect(issue.state).to eq("closed")
expect(issue.label_names).to include("Priority: Medium")
expect(issue.label_names).to include("Status: Fixed")
......
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