mirror of
https://github.com/wekan/wekan.git
synced 2026-03-13 17:06:13 +01:00
Merge branch 'zebby76-devel' into devel
This commit is contained in:
commit
21e68f3e54
2 changed files with 18 additions and 6 deletions
|
|
@ -1,3 +1,11 @@
|
||||||
|
# Upcoming Wekan release
|
||||||
|
|
||||||
|
This release fixes the following bugs:
|
||||||
|
|
||||||
|
- [Fix Trello import of ChecklistItems](https://github.com/wekan/wekan/pull/1611).
|
||||||
|
|
||||||
|
Thanks to Github user zebby76 for contributions.
|
||||||
|
|
||||||
# v0.87 2018-04-27 Wekan release
|
# v0.87 2018-04-27 Wekan release
|
||||||
|
|
||||||
This release fixes the following bugs:
|
This release fixes the following bugs:
|
||||||
|
|
|
||||||
|
|
@ -429,17 +429,21 @@ export class TrelloCreator {
|
||||||
const checklistId = Checklists.direct.insert(checklistToCreate);
|
const checklistId = Checklists.direct.insert(checklistToCreate);
|
||||||
// keep track of Trello id => WeKan id
|
// keep track of Trello id => WeKan id
|
||||||
this.checklists[checklist.id] = checklistId;
|
this.checklists[checklist.id] = checklistId;
|
||||||
// Now add the items to the checklist
|
// Now add the items to the checklistItems
|
||||||
|
var counter = 0;
|
||||||
const itemsToCreate = [];
|
const itemsToCreate = [];
|
||||||
checklist.checkItems.forEach((item) => {
|
checklist.checkItems.forEach((item) => {
|
||||||
itemsToCreate.push({
|
counter++;
|
||||||
_id: checklistId + itemsToCreate.length,
|
const checklistItemTocreate = {
|
||||||
|
_id: checklistId + counter,
|
||||||
title: item.name,
|
title: item.name,
|
||||||
isFinished: item.state === 'complete',
|
checklistId: this.checklists[checklist.id],
|
||||||
|
cardId: this.cards[checklist.idCard],
|
||||||
sort: item.pos,
|
sort: item.pos,
|
||||||
});
|
isFinished: item.state === 'complete',
|
||||||
|
};
|
||||||
|
ChecklistItems.direct.insert(checklistItemTocreate);
|
||||||
});
|
});
|
||||||
Checklists.direct.update(checklistId, {$set: {items: itemsToCreate}});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue