소스 검색

Merge branch 'fix_subtasks' of https://github.com/andresmanelli/wekan into andresmanelli-fix_subtasks

Lauri Ojansivu 6 년 전
부모
커밋
d5d33247fb
2개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 3
      models/boards.js
  2. 2 1
      server/publications/boards.js

+ 1 - 3
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;
   },

+ 2 - 1
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