Commit 943e2a95 authored by Marvin Karegyeya's avatar Marvin Karegyeya Committed by Kushal Pandya

Remove onNewIssuesResponse function logic from list model

parent 1a0eb000
...@@ -170,12 +170,7 @@ class List { ...@@ -170,12 +170,7 @@ class List {
} }
onNewIssueResponse(issue, data) { onNewIssueResponse(issue, data) {
issue.refreshData(data); boardsStore.onNewListIssueResponse(this, issue, data);
if (this.issuesSize > 1) {
const moveBeforeId = this.issues[1].id;
boardsStore.moveIssue(issue.id, null, null, null, moveBeforeId);
}
} }
} }
......
...@@ -296,6 +296,15 @@ const boardsStore = { ...@@ -296,6 +296,15 @@ const boardsStore = {
Object.assign(this.moving, { list, issue }); Object.assign(this.moving, { list, issue });
}, },
onNewListIssueResponse(list, issue, data) {
issue.refreshData(data);
if (list.issuesSize > 1) {
const moveBeforeId = list.issues[1].id;
this.moveIssue(issue.id, null, null, null, moveBeforeId);
}
},
moveMultipleIssuesToList({ listFrom, listTo, issues, newIndex }) { moveMultipleIssuesToList({ listFrom, listTo, issues, newIndex }) {
const issueTo = issues.map(issue => listTo.findIssue(issue.id)); const issueTo = issues.map(issue => listTo.findIssue(issue.id));
const issueLists = issues.map(issue => issue.getLists()).flat(); const issueLists = issues.map(issue => issue.getLists()).flat();
......
---
title: Remove onNewIssueResponse logic from list model
merge_request: 32245
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