mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
implement getDefaultSwimline for boards
This commit is contained in:
parent
aead18eb58
commit
04745f0c2f
4 changed files with 15 additions and 11 deletions
|
|
@ -154,15 +154,7 @@ Migrations.add('add-sort-checklists', () => {
|
|||
|
||||
Migrations.add('add-swimlanes', () => {
|
||||
Boards.find().forEach((board) => {
|
||||
const swimlane = Swimlanes.findOne({ boardId: board._id });
|
||||
let swimlaneId = '';
|
||||
if (swimlane)
|
||||
swimlaneId = swimlane._id;
|
||||
else
|
||||
swimlaneId = Swimlanes.direct.insert({
|
||||
boardId: board._id,
|
||||
title: 'Default',
|
||||
});
|
||||
const swimlaneId = board.getDefaultSwimline()._id;
|
||||
|
||||
Cards.find({ boardId: board._id }).forEach((card) => {
|
||||
if (!card.hasOwnProperty('swimlaneId')) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue