Commit 1c46bc3c authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'Remove-removeMultipleIssues-logic-from-list-model' into 'master'

Remove removeMultipleIssues function logic from list model

See merge request gitlab-org/gitlab!32254
parents 16724443 2901959f
......@@ -158,18 +158,7 @@ class List {
}
removeMultipleIssues(removeIssues) {
const ids = removeIssues.map(issue => issue.id);
this.issues = this.issues.filter(issue => {
const matchesRemove = ids.includes(issue.id);
if (matchesRemove) {
this.issuesSize -= 1;
issue.removeLabel(this.label);
}
return !matchesRemove;
});
return boardsStore.removeListMultipleIssues(this, removeIssues);
}
removeIssue(removeIssue) {
......
......@@ -277,6 +277,20 @@ const boardsStore = {
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) {
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