From 692a1bc369314bc3f8464e2b7ae611775a07be6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Manelli?= Date: Wed, 2 May 2018 15:11:26 -0300 Subject: Refactor imported -> linked in server and i18n --- i18n/en.i18n.json | 7 ++++--- server/migrations.js | 2 +- server/publications/boards.js | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index bd9780a7..f4222c5b 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -137,8 +137,8 @@ "cards-count": "Cards", "casSignIn" : "Sign In with CAS", "cardType-card": "Card", - "cardType-importedCard": "Imported Card", - "cardType-importedBoard": "Imported Board", + "cardType-linkedCard": "Linked Card", + "cardType-linkedBoard": "Linked Board", "change": "Change", "change-avatar": "Change Avatar", "change-password": "Change Password", @@ -175,7 +175,7 @@ "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?", "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", "copy-card-link-to-clipboard": "Copy card link to clipboard", - "importCardPopup-title": "Import Card", + "linkCardPopup-title": "Link Card", "searchCardPopup-title": "Search Card", "copyCardPopup-title": "Copy Card", "copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards", @@ -267,6 +267,7 @@ "headerBarCreateBoardPopup-title": "Create Board", "home": "Home", "import": "Import", + "link": "Link", "import-board": "import board", "import-board-c": "Import board", "import-board-title-trello": "Import board from Trello", diff --git a/server/migrations.js b/server/migrations.js index 32f24e4c..16fe225e 100644 --- a/server/migrations.js +++ b/server/migrations.js @@ -219,7 +219,7 @@ Migrations.add('add-card-types', () => { { _id: card._id }, { $set: { type: 'cardType-card', - importedId: null } }, + linkedId: null } }, noValidate ); }); diff --git a/server/publications/boards.js b/server/publications/boards.js index 1d95c3d9..b68f7360 100644 --- a/server/publications/boards.js +++ b/server/publications/boards.js @@ -99,16 +99,16 @@ Meteor.publishRelations('board', function(boardId) { // And in the meantime our code below works pretty well -- it's not even a // hack! this.cursor(Cards.find({ boardId }), function(cardId, card) { - if (card.type === 'cardType-importedCard') { - const impCardId = card.importedId; + if (card.type === 'cardType-linkedCard') { + const impCardId = card.linkedId; this.cursor(Cards.find({ _id: impCardId })); this.cursor(CardComments.find({ cardId: impCardId })); this.cursor(Activities.find({ cardId: impCardId })); this.cursor(Attachments.find({ cardId: impCardId })); this.cursor(Checklists.find({ cardId: impCardId })); this.cursor(ChecklistItems.find({ cardId: impCardId })); - } else if (card.type === 'cardType-importedBoard') { - this.cursor(Boards.find({ _id: card.importedId})); + } else if (card.type === 'cardType-linkedBoard') { + this.cursor(Boards.find({ _id: card.linkedId})); } this.cursor(Activities.find({ cardId })); this.cursor(CardComments.find({ cardId })); -- cgit v1.2.3-1-g7c22