From a6e3c8984d76d56d0803c67c6e857d052e892aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Manelli?= Date: Sun, 17 Mar 2019 16:23:59 +0100 Subject: [PATCH] Fix dissapearing subtasks --- models/boards.js | 4 +--- server/publications/boards.js | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/models/boards.js b/models/boards.js index 9a71ede85..3c9d6da09 100644 --- a/models/boards.js +++ b/models/boards.js @@ -605,9 +605,7 @@ Boards.helpers({ title: TAPi18n.__('queue'), boardId: this._id, }); - Boards.update(this._id, {$set: { - subtasksDefaultListId: this.subtasksDefaultListId, - }}); + this.setSubtasksDefaultListId(this.subtasksDefaultListId); } return this.subtasksDefaultListId; }, diff --git a/server/publications/boards.js b/server/publications/boards.js index 18c44d2b1..b6fc0b97f 100644 --- a/server/publications/boards.js +++ b/server/publications/boards.js @@ -116,7 +116,7 @@ Meteor.publishRelations('board', function(boardId) { const boards = this.join(Boards); const subCards = this.join(Cards); - this.cursor(Cards.find({ boardId }), function(cardId, card) { + this.cursor(Cards.find({ boardId: {$in: [boardId, board.subtasksDefaultBoardId]}}), function(cardId, card) { if (card.type === 'cardType-linkedCard') { const impCardId = card.linkedId; subCards.push(impCardId); @@ -141,6 +141,7 @@ Meteor.publishRelations('board', function(boardId) { checklists.send(); checklistItems.send(); boards.send(); + parentCards.send(); if (board.members) { // Board members. This publication also includes former board members that