fix: Set after destination order when no previous US

stable
Miguel Gonzalez 2018-07-31 23:14:28 +02:00 committed by Alex Hermida
parent 547b1016d4
commit 81e1811560
1 changed files with 9 additions and 0 deletions

View File

@ -132,6 +132,15 @@ class KanbanUserstoriesService extends taiga.Service
else if !previous
startIndex = 0
for it, key in afterDestination # increase position of the us after the dragged us's
@.order[it.id] = key + initialLength + 1
it.kanban_order = @.order[it.id]
setNextOrders = _.map(afterDestination, (it) =>
{us_id: it.id, order: @.order[it.id]}
)
else if previous
startIndex = @.order[previous.id] + 1