mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04:00
Fix for issue #1569 Trello data without labels definition
This commit is contained in:
parent
12aa7ea2cb
commit
74ac7d8d3f
1 changed files with 13 additions and 11 deletions
|
@ -208,17 +208,19 @@ export class TrelloCreator {
|
|||
}
|
||||
});
|
||||
}
|
||||
trelloBoard.labels.forEach(label => {
|
||||
const labelToCreate = {
|
||||
_id: Random.id(6),
|
||||
color: label.color ? label.color : 'black',
|
||||
name: label.name,
|
||||
};
|
||||
// We need to remember them by Trello ID, as this is the only ref we have
|
||||
// when importing cards.
|
||||
this.labels[label.id] = labelToCreate._id;
|
||||
boardToCreate.labels.push(labelToCreate);
|
||||
});
|
||||
if (trelloBoard.labels) {
|
||||
trelloBoard.labels.forEach(label => {
|
||||
const labelToCreate = {
|
||||
_id: Random.id(6),
|
||||
color: label.color ? label.color : 'black',
|
||||
name: label.name,
|
||||
};
|
||||
// We need to remember them by Trello ID, as this is the only ref we have
|
||||
// when importing cards.
|
||||
this.labels[label.id] = labelToCreate._id;
|
||||
boardToCreate.labels.push(labelToCreate);
|
||||
});
|
||||
}
|
||||
const boardId = Boards.direct.insert(boardToCreate);
|
||||
Boards.direct.update(boardId, { $set: { modifiedAt: this._now() } });
|
||||
// log activity
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue