Commit 855966c5 authored by Simon Knox's avatar Simon Knox

update assignee and labels from response

parent a353b253
......@@ -42,7 +42,6 @@ export default {
this.error = false;
const board = Store.state.currentBoard;
const labels = this.list.label ? [this.list.label] : [];
const issue = new ListIssue({
title: this.title,
......@@ -52,14 +51,6 @@ export default {
project_id: this.selectedProject.id,
});
if (board.assignee) {
issue.assignees = [board.assignee];
}
if (board.labels.length > 0) {
issue.labels = _.uniq([...labels, ...board.labels], label => label.id);
}
eventHub.$emit(`scroll-board-list-${this.list.id}`);
this.cancel();
......
......@@ -38,7 +38,7 @@ gl.issueBoards.ModalFooter = Vue.extend({
add_label_ids: [list.label.id, ...boardLabelIds],
milestone_id: currentBoard.milestone_id,
assignee_ids: [currentBoard.assignee_id],
weight: currentBoard.weight
weight: currentBoard.weight,
}).catch(() => {
new Flash('Failed to update issues, please try again.', 'alert');
......
......@@ -114,6 +114,8 @@ class List {
issue.iid = data.iid;
issue.milestone = data.milestone;
issue.project = data.project;
issue.assignees = data.assignees;
issue.labels = data.labels;
if (this.issuesSize > 1) {
const moveBeforeId = this.issues[1].id;
......
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