diff options
author | Phil Hughes <me@iamphill.com> | 2017-01-31 14:35:53 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-02-03 17:02:44 +0300 |
commit | 103c78f18c0642c36a6093508707b82eb8d1dd77 (patch) | |
tree | a4be3ccb885e5e615c88777364d1412ca004427b /app/assets/javascripts/boards/components/sidebar | |
parent | 32a97ef19c9adf30bd67bb310551dff883231dbc (diff) | |
download | gitlab-ce-103c78f18c0642c36a6093508707b82eb8d1dd77.tar.gz |
Removes labels instead of closing issue when clicking remove button
Diffstat (limited to 'app/assets/javascripts/boards/components/sidebar')
-rw-r--r-- | app/assets/javascripts/boards/components/sidebar/remove_issue.js.es6 | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/app/assets/javascripts/boards/components/sidebar/remove_issue.js.es6 b/app/assets/javascripts/boards/components/sidebar/remove_issue.js.es6 index 3f965b7b9b2..70f7da17d49 100644 --- a/app/assets/javascripts/boards/components/sidebar/remove_issue.js.es6 +++ b/app/assets/javascripts/boards/components/sidebar/remove_issue.js.es6 @@ -11,9 +11,18 @@ ], methods: { removeIssue() { - const doneList = Store.findList('type', 'done', false); + const lists = this.issue.getLists(); + const labelIds = lists.map(list => list.label.id); - Store.moveIssueToList(this.list, doneList, this.issue, 0); + // Post the remove data + gl.boardService.bulkUpdate([this.issue.globalId], { + remove_label_ids: labelIds, + }); + + // Remove from the frontend store + lists.forEach((list) => { + list.removeIssue(this.issue); + }); Store.detail.issue = {}; }, |