feat: Move US to the end when status archived and hidden

stable
Miguel Gonzalez 2018-07-31 22:49:19 +02:00 committed by Alex Hermida
parent 6478cbf9c7
commit 547b1016d4
1 changed files with 8 additions and 1 deletions

View File

@ -94,6 +94,7 @@ class KanbanUserstoriesService extends taiga.Service
@.refresh()
move: (usList, statusId, index) ->
initialLength = usList.length
usByStatus = _.filter @.userstoriesRaw, (it) =>
@ -123,7 +124,13 @@ class KanbanUserstoriesService extends taiga.Service
setPreviousOrders = []
setNextOrders = []
if !previous
isArchivedHiddenStatus = @.archivedStatus.indexOf(statusId) != -1 &&
@.statusHide.indexOf(statusId) != -1
if isArchivedHiddenStatus
startIndex = new Date().getTime()
else if !previous
startIndex = 0
else if previous
startIndex = @.order[previous.id] + 1