summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2019-03-08 23:39:33 +0100
committerAndrés Manelli <andresmanelli@gmail.com>2019-03-16 22:49:45 +0100
commit4cd0d1c3971f001eccf023bb84f1bee113fed215 (patch)
tree207684b92f9d07294a29b850d672b3f0cc1bae72 /client
parentff19d6744e3f4a944944185d41b944310f35fc36 (diff)
downloadwekan-4cd0d1c3971f001eccf023bb84f1bee113fed215.tar.gz
wekan-4cd0d1c3971f001eccf023bb84f1bee113fed215.tar.bz2
wekan-4cd0d1c3971f001eccf023bb84f1bee113fed215.zip
Migrate customFields
Diffstat (limited to 'client')
-rw-r--r--client/components/sidebar/sidebarCustomFields.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/components/sidebar/sidebarCustomFields.js b/client/components/sidebar/sidebarCustomFields.js
index ccc8ffb9..bdd8e7a0 100644
--- a/client/components/sidebar/sidebarCustomFields.js
+++ b/client/components/sidebar/sidebarCustomFields.js
@@ -2,7 +2,7 @@ BlazeComponent.extendComponent({
customFields() {
return CustomFields.find({
- boardId: Session.get('currentBoard'),
+ boardIds: {$in: [Session.get('currentBoard')]},
});
},
@@ -103,7 +103,6 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
evt.preventDefault();
const data = {
- boardId: Session.get('currentBoard'),
name: this.find('.js-field-name').value.trim(),
type: this.type.get(),
settings: this.getSettings(),
@@ -114,8 +113,10 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
// insert or update
if (!this.data()._id) {
+ data.boardIds = [Session.get('currentBoard')];
CustomFields.insert(data);
} else {
+ data.boardIds = {$in: [Session.get('currentBoard')]};
CustomFields.update(this.data()._id, {$set: data});
}