Commit a2945210 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'Remove-removeIssue-function-logic-from-list-model' into 'master'

Remove removeissue logic to from list model

See merge request gitlab-org/gitlab!32249
parents a376ab7b b7886650
...@@ -195,16 +195,7 @@ class List { ...@@ -195,16 +195,7 @@ class List {
} }
removeIssue(removeIssue) { removeIssue(removeIssue) {
this.issues = this.issues.filter(issue => { return boardsStore.removeListIssues(this, removeIssue);
const matchesRemove = removeIssue.id === issue.id;
if (matchesRemove) {
this.issuesSize -= 1;
issue.removeLabel(this.label);
}
return !matchesRemove;
});
} }
getTypeInfo(type) { getTypeInfo(type) {
......
...@@ -247,6 +247,19 @@ const boardsStore = { ...@@ -247,6 +247,19 @@ const boardsStore = {
} }
}, },
removeListIssues(list, removeIssue) {
list.issues = list.issues.filter(issue => {
const matchesRemove = removeIssue.id === 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 removeIssue logic from list model
merge_request:
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