summaryrefslogtreecommitdiffstats
path: root/models/boards.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/boards.js')
-rw-r--r--models/boards.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/models/boards.js b/models/boards.js
index 6f0f7293..a8b7191e 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -337,6 +337,18 @@ Boards.helpers({
getDefaultSubtasksList() {
return Lists.findOne(this.getDefaultSubtasksListId());
},
+
+ getDefaultSwimline() {
+ let result = Swimlanes.findOne({boardId: this._id});
+ if (result === undefined) {
+ Swimlanes.insert({
+ title: TAPi18n.__('default'),
+ boardId: this._id,
+ });
+ result = Swimlanes.findOne({boardId: this._id});
+ }
+ return result;
+ },
});