Commit c6fae52f authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'Remove-addLabel-function-logic-from-issue-models' into 'master'

Remove addLabel function logic  from issue model

See merge request gitlab-org/gitlab!32233
parents 9834a407 9cb7db03
...@@ -30,9 +30,7 @@ class ListIssue { ...@@ -30,9 +30,7 @@ class ListIssue {
} }
addLabel(label) { addLabel(label) {
if (!this.findLabel(label)) { boardsStore.addIssueLabel(this, label);
this.labels.push(new ListLabel(label));
}
} }
findLabel(findLabel) { findLabel(findLabel) {
......
...@@ -844,6 +844,11 @@ const boardsStore = { ...@@ -844,6 +844,11 @@ const boardsStore = {
issue.assignees = obj.assignees.map(a => new ListAssignee(a)); issue.assignees = obj.assignees.map(a => new ListAssignee(a));
} }
}, },
addIssueLabel(issue, label) {
if (!issue.findLabel(label)) {
issue.labels.push(new ListLabel(label));
}
},
updateIssue(issue) { updateIssue(issue) {
const data = { const data = {
issue: { issue: {
......
---
title: Remove addLabel Logic from issue models
merge_request: 32233
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