mirror of
https://github.com/wekan/wekan.git
synced 2025-12-24 03:10:12 +01:00
Fix migration. Replace old checklist-item sort algorithm.
This commit is contained in:
parent
bf7de463f1
commit
153960742c
7 changed files with 114 additions and 64 deletions
|
|
@ -191,10 +191,10 @@ Migrations.add('add-views', () => {
|
|||
Migrations.add('add-checklist-items', () => {
|
||||
Checklists.find().forEach((checklist) => {
|
||||
// Create new items
|
||||
_.sortBy(checklist.items, 'sort').forEach((item) => {
|
||||
_.sortBy(checklist.items, 'sort').forEach((item, index) => {
|
||||
ChecklistItems.direct.insert({
|
||||
title: item.title,
|
||||
sort: item.sort,
|
||||
sort: index,
|
||||
isFinished: item.isFinished,
|
||||
checklistId: checklist._id,
|
||||
cardId: checklist.cardId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue