瀏覽代碼

Import sort attribute of checklists and its items from Trello

Ghassen Rjab 7 年之前
父節點
當前提交
a410dc50bb
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      models/trelloCreator.js

+ 2 - 0
models/trelloCreator.js

@@ -403,6 +403,7 @@ export class TrelloCreator {
         cardId: this.cards[checklist.idCard],
         title: checklist.name,
         createdAt: this._now(),
+        sort: checklist.pos,
       };
       const checklistId = Checklists.direct.insert(checklistToCreate);
       // keep track of Trello id => WeKan id
@@ -414,6 +415,7 @@ export class TrelloCreator {
           _id: checklistId + itemsToCreate.length,
           title: item.name,
           isFinished: item.state === 'complete',
+          sort: item.pos,
         });
       });
       Checklists.direct.update(checklistId, {$set: {items: itemsToCreate}});