mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Add import Wekan board feature
This commit is contained in:
parent
61b2c91ffe
commit
3f4c285551
11 changed files with 1096 additions and 529 deletions
14
client/components/import/trelloMembersMapper.js
Normal file
14
client/components/import/trelloMembersMapper.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
export function getMembersToMap(data) {
|
||||
// we will work on the list itself (an ordered array of objects) when a
|
||||
// mapping is done, we add a 'wekan' field to the object representing the
|
||||
// imported member
|
||||
const membersToMap = data.members;
|
||||
// auto-map based on username
|
||||
membersToMap.forEach((importedMember) => {
|
||||
const wekanUser = Users.findOne({ username: importedMember.username });
|
||||
if (wekanUser) {
|
||||
importedMember.wekanId = wekanUser._id;
|
||||
}
|
||||
});
|
||||
return membersToMap;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue