summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorGhassen Rjab <rjab.ghassen@gmail.com>2017-09-16 20:01:54 +0100
committerGhassen Rjab <rjab.ghassen@gmail.com>2017-09-16 20:01:54 +0100
commita410dc50bba4059d7e94ecf686d21387c791c9e1 (patch)
tree04226ebde00f876edc49aebc0baf6073e046562e /models
parent2f69e65dc0c5de0ae7d39728ab0e1c7132733720 (diff)
downloadwekan-a410dc50bba4059d7e94ecf686d21387c791c9e1.tar.gz
wekan-a410dc50bba4059d7e94ecf686d21387c791c9e1.tar.bz2
wekan-a410dc50bba4059d7e94ecf686d21387c791c9e1.zip
Import sort attribute of checklists and its items from Trello
Diffstat (limited to 'models')
-rw-r--r--models/trelloCreator.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/trelloCreator.js b/models/trelloCreator.js
index b296efdf..e7f98e85 100644
--- a/models/trelloCreator.js
+++ b/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}});