summaryrefslogtreecommitdiffstats
path: root/client/components/sidebar
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2019-03-16 22:43:47 +0100
committerAndrés Manelli <andresmanelli@gmail.com>2019-03-16 22:49:45 +0100
commitd01fccd9497120613bf2c0b986963e67e7f3d6fa (patch)
tree0ad6cc465e427397b7125bb8f3ff0f0719d28c0b /client/components/sidebar
parent4cd0d1c3971f001eccf023bb84f1bee113fed215 (diff)
downloadwekan-d01fccd9497120613bf2c0b986963e67e7f3d6fa.tar.gz
wekan-d01fccd9497120613bf2c0b986963e67e7f3d6fa.tar.bz2
wekan-d01fccd9497120613bf2c0b986963e67e7f3d6fa.zip
- Fix card copy & move between boards with customFields
- Fix card copy & move between boards with labels with same name - Fix activities for labels when copying and moving card - Fix activities for customFields when copying and moving card
Diffstat (limited to 'client/components/sidebar')
-rw-r--r--client/components/sidebar/sidebarCustomFields.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/client/components/sidebar/sidebarCustomFields.js b/client/components/sidebar/sidebarCustomFields.js
index bdd8e7a0..81147ce5 100644
--- a/client/components/sidebar/sidebarCustomFields.js
+++ b/client/components/sidebar/sidebarCustomFields.js
@@ -116,15 +116,22 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
data.boardIds = [Session.get('currentBoard')];
CustomFields.insert(data);
} else {
- data.boardIds = {$in: [Session.get('currentBoard')]};
CustomFields.update(this.data()._id, {$set: data});
}
Popup.back();
},
'click .js-delete-custom-field': Popup.afterConfirm('deleteCustomField', function() {
- const customFieldId = this._id;
- CustomFields.remove(customFieldId);
+ const customField = CustomFields.findOne(this._id);
+ if (customField.boardIds.length > 1) {
+ CustomFields.update(customField._id, {
+ $pull: {
+ boardIds: Session.get('currentBoard')
+ }
+ });
+ } else {
+ CustomFields.remove(customField._id);
+ }
Popup.close();
}),
}];