Răsfoiți Sursa

Import sort attribute of checklists and its items from Trello

Ghassen Rjab 7 ani în urmă
părinte
comite
a410dc50bb
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      models/trelloCreator.js

+ 2 - 0
models/trelloCreator.js

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