summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorGhassen Rjab <rjab.ghassen@gmail.com>2017-07-20 00:24:21 +0100
committerGhassen Rjab <rjab.ghassen@gmail.com>2017-07-20 00:24:21 +0100
commit25ce99958cda9e752366ddd9d00a29314ef78fa0 (patch)
treed6fd8396f52298af175726db31306f789945be7f /models
parent31400673304d39c95ecb04c430aceff2f96e1987 (diff)
downloadwekan-25ce99958cda9e752366ddd9d00a29314ef78fa0.tar.gz
wekan-25ce99958cda9e752366ddd9d00a29314ef78fa0.tar.bz2
wekan-25ce99958cda9e752366ddd9d00a29314ef78fa0.zip
Export checklists
Diffstat (limited to 'models')
-rw-r--r--models/export.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/export.js b/models/export.js
index 7243cf24..49656134 100644
--- a/models/export.js
+++ b/models/export.js
@@ -55,6 +55,10 @@ class Exporter {
result.cards = Cards.find(byBoard, noBoardId).fetch();
result.comments = CardComments.find(byBoard, noBoardId).fetch();
result.activities = Activities.find(byBoard, noBoardId).fetch();
+ result.checklists = [];
+ result.cards.forEach((card) => {
+ result.checklists.push(...Checklists.find({ cardId: card._id }).fetch());
+ });
// [Old] for attachments we only export IDs and absolute url to original doc
// [New] Encode attachment to base64
const getBase64Data = function(doc, callback) {
@@ -99,6 +103,7 @@ class Exporter {
});
result.comments.forEach((comment) => { users[comment.userId] = true; });
result.activities.forEach((activity) => { users[activity.userId] = true; });
+ result.checklists.forEach((checklist) => { users[checklist.userId] = true; });
const byUserIds = { _id: { $in: Object.getOwnPropertyNames(users) } };
// we use whitelist to be sure we do not expose inadvertently
// some secret fields that gets added to User later.