diff options
Diffstat (limited to 'app/assets/javascripts/boards/boards_util.js')
-rw-r--r-- | app/assets/javascripts/boards/boards_util.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/boards/boards_util.js b/app/assets/javascripts/boards/boards_util.js index d113a1d39d8..c10241d00d7 100644 --- a/app/assets/javascripts/boards/boards_util.js +++ b/app/assets/javascripts/boards/boards_util.js @@ -43,7 +43,9 @@ export function formatListIssues(listIssues) { let sortedIssues = list.issues.edges.map((issueNode) => ({ ...issueNode.node, })); - sortedIssues = sortBy(sortedIssues, 'relativePosition'); + if (list.listType !== ListType.closed) { + sortedIssues = sortBy(sortedIssues, 'relativePosition'); + } return { ...map, @@ -146,7 +148,8 @@ export function getMoveData(state, params) { } export function moveItemListHelper(item, fromList, toList) { - const updatedItem = item; + const updatedItem = cloneDeep(item); + if ( toList.listType === ListType.label && !updatedItem.labels.find((label) => label.id === toList.label.id) |