summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorNicu Tofan <nicu.tofan@gmail.com>2018-06-25 23:12:20 +0300
committerNicu Tofan <nicu.tofan@gmail.com>2018-06-26 14:32:51 +0300
commit94a52080cff14f7587c0ee837c1fca131cd6aff0 (patch)
tree9c4350d54b1d98d7ccfdcf09620e2fb8d5cf2c2d /models
parentc9f70cf382707141561732a46dbd3e3e2f159e6e (diff)
downloadwekan-94a52080cff14f7587c0ee837c1fca131cd6aff0.tar.gz
wekan-94a52080cff14f7587c0ee837c1fca131cd6aff0.tar.bz2
wekan-94a52080cff14f7587c0ee837c1fca131cd6aff0.zip
Board level settings for subtasks
Diffstat (limited to 'models')
-rw-r--r--models/boards.js16
-rw-r--r--models/cards.js2
2 files changed, 17 insertions, 1 deletions
diff --git a/models/boards.js b/models/boards.js
index fce674ae..b5b0b0fc 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -161,6 +161,10 @@ Boards.attachSchema(new SimpleSchema({
optional: true,
defaultValue: null,
},
+ allowsSubtasks: {
+ type: Boolean,
+ defaultValue: true,
+ },
}));
@@ -473,6 +477,18 @@ Boards.mutations({
},
};
},
+
+ setAllowsSubtasks(allowsSubtasks) {
+ return { $set: { allowsSubtasks } };
+ },
+
+ setSubtasksDefaultBoardId(subtasksDefaultBoardId) {
+ return { $set: { subtasksDefaultBoardId } };
+ },
+
+ setSubtasksDefaultListId(subtasksDefaultListId) {
+ return { $set: { subtasksDefaultListId } };
+ },
});
if (Meteor.isServer) {
diff --git a/models/cards.js b/models/cards.js
index 2563fdf8..8d7a93d0 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -258,7 +258,7 @@ Cards.helpers({
return finishCount > 0 && this.subtasksCount() === finishCount;
},
- hasSubtasks() {
+ allowsSubtasks() {
return this.subtasksCount() !== 0;
},