From a82aa87850b9bfbab503b1f07dd6b7542a20c2f4 Mon Sep 17 00:00:00 2001 From: Nunes Nelson Date: Mon, 5 Nov 2018 21:46:57 +0100 Subject: custom fields upgrade --- client/components/lists/listBody.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'client/components/lists/listBody.js') diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index d99d9dc8..66b50123 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -59,6 +59,8 @@ BlazeComponent.extendComponent({ swimlaneId, type: 'cardType-card', }); + + // In case the filter is active we need to add the newly inserted card in // the list of exceptions -- cards that are not filtered. Otherwise the // card will disappear instantly. @@ -152,6 +154,14 @@ BlazeComponent.extendComponent({ this.labels = new ReactiveVar([]); this.members = new ReactiveVar([]); this.customFields = new ReactiveVar([]); + + const currentBoardId = Session.get('currentBoard'); + arr = [] + _.forEach(Boards.findOne(currentBoardId).customFields().fetch(), function(field){ + if(field.automaticallyOnCard) + arr.push({_id: field._id, value: null,}) + }) + this.customFields.set(arr); }, reset() { -- cgit v1.2.3-1-g7c22 From f2dd725eff931c9b5c836d17fe0a72dca07a1ceb Mon Sep 17 00:00:00 2001 From: Nunes Nelson Date: Wed, 7 Nov 2018 18:23:28 +0100 Subject: custom fields upgrade -- correct --- client/components/lists/listBody.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/components/lists/listBody.js') diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 66b50123..1001f3bc 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -156,11 +156,11 @@ BlazeComponent.extendComponent({ this.customFields = new ReactiveVar([]); const currentBoardId = Session.get('currentBoard'); - arr = [] + arr = []; _.forEach(Boards.findOne(currentBoardId).customFields().fetch(), function(field){ if(field.automaticallyOnCard) - arr.push({_id: field._id, value: null,}) - }) + arr.push({_id: field._id, value: null}); + }); this.customFields.set(arr); }, -- cgit v1.2.3-1-g7c22