summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Knox <psimyn@gmail.com>2017-09-06 17:13:07 +1000
committerSimon Knox <psimyn@gmail.com>2017-09-06 17:17:04 +1000
commitfeffc3ec4546bf07d47e6be8b3b63421362103d2 (patch)
tree82fa0e999edd80f74c754818dfe54b06a99eb71c
parenteff1c1213e4a5aefb86e52d71d58acfd19d494a5 (diff)
downloadgitlab-ce-feffc3ec4546bf07d47e6be8b3b63421362103d2.tar.gz
pick some missing JS
-rw-r--r--app/assets/javascripts/boards/components/sidebar/remove_issue.js7
-rw-r--r--app/assets/javascripts/boards/models/list.js1
2 files changed, 5 insertions, 3 deletions
diff --git a/app/assets/javascripts/boards/components/sidebar/remove_issue.js b/app/assets/javascripts/boards/components/sidebar/remove_issue.js
index b44e87b051d..1e623cf58b7 100644
--- a/app/assets/javascripts/boards/components/sidebar/remove_issue.js
+++ b/app/assets/javascripts/boards/components/sidebar/remove_issue.js
@@ -33,11 +33,12 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
const issue = this.issue;
const lists = issue.getLists();
const listLabelIds = lists.map(list => list.label.id);
- const labelIds = this.issue.labels
+ let labelIds = this.issue.labels
.map(label => label.id)
.filter(id => !listLabelIds.includes(id));
-
- // Post the remove data
+ if (labelIds.length === 0) {
+ labelIds = [''];
+ }
const data = {
issue: {
label_ids: labelIds,
diff --git a/app/assets/javascripts/boards/models/list.js b/app/assets/javascripts/boards/models/list.js
index 787f5eae64d..df2809e1805 100644
--- a/app/assets/javascripts/boards/models/list.js
+++ b/app/assets/javascripts/boards/models/list.js
@@ -112,6 +112,7 @@ class List {
.then((data) => {
issue.id = data.id;
issue.iid = data.iid;
+ issue.project = data.project;
if (this.issuesSize > 1) {
const moveBeforeId = this.issues[1].id;