From 25ce99958cda9e752366ddd9d00a29314ef78fa0 Mon Sep 17 00:00:00 2001 From: Ghassen Rjab Date: Thu, 20 Jul 2017 00:24:21 +0100 Subject: Export checklists --- models/export.js | 5 +++++ 1 file changed, 5 insertions(+) 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. -- cgit v1.2.3-1-g7c22