Commit 2901959f authored by Marvin Karegyeya's avatar Marvin Karegyeya Committed by Kushal Pandya

Remove removeMultipleIssues function logic from list model

parent a70da6da
...@@ -158,18 +158,7 @@ class List { ...@@ -158,18 +158,7 @@ class List {
} }
removeMultipleIssues(removeIssues) { removeMultipleIssues(removeIssues) {
const ids = removeIssues.map(issue => issue.id); return boardsStore.removeListMultipleIssues(this, removeIssues);
this.issues = this.issues.filter(issue => {
const matchesRemove = ids.includes(issue.id);
if (matchesRemove) {
this.issuesSize -= 1;
issue.removeLabel(this.label);
}
return !matchesRemove;
});
} }
removeIssue(removeIssue) { removeIssue(removeIssue) {
......
...@@ -275,6 +275,20 @@ const boardsStore = { ...@@ -275,6 +275,20 @@ const boardsStore = {
return !matchesRemove; return !matchesRemove;
}); });
}, },
removeListMultipleIssues(list, removeIssues) {
const ids = removeIssues.map(issue => issue.id);
list.issues = list.issues.filter(issue => {
const matchesRemove = ids.includes(issue.id);
if (matchesRemove) {
list.issuesSize -= 1;
issue.removeLabel(list.label);
}
return !matchesRemove;
});
},
startMoving(list, issue) { startMoving(list, issue) {
Object.assign(this.moving, { list, issue }); Object.assign(this.moving, { list, issue });
......
---
title: Remove removeMultipleIssues logic from list model
merge_request: 32254
author: nuwe1
type: other
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