Fix tasks not exported
This commit is contained in:
parent
07bda3eae3
commit
465f6d90ab
1 changed files with 7 additions and 11 deletions
|
@ -130,6 +130,8 @@ func exportListsAndTasks(s *xorm.Session, u *user.User, wr *zip.Writer) (err err
|
||||||
|
|
||||||
namespaceIDs := []int64{}
|
namespaceIDs := []int64{}
|
||||||
namespaces := []*NamespaceWithListsAndTasks{}
|
namespaces := []*NamespaceWithListsAndTasks{}
|
||||||
|
listMap := make(map[int64]*ListWithTasksAndBuckets)
|
||||||
|
listIDs := []int64{}
|
||||||
for _, n := range namspaces.([]*NamespaceWithLists) {
|
for _, n := range namspaces.([]*NamespaceWithLists) {
|
||||||
if n.ID < 1 {
|
if n.ID < 1 {
|
||||||
// Don't include filters
|
// Don't include filters
|
||||||
|
@ -142,11 +144,14 @@ func exportListsAndTasks(s *xorm.Session, u *user.User, wr *zip.Writer) (err err
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, l := range n.Lists {
|
for _, l := range n.Lists {
|
||||||
nn.Lists = append(nn.Lists, &ListWithTasksAndBuckets{
|
ll := &ListWithTasksAndBuckets{
|
||||||
List: *l,
|
List: *l,
|
||||||
BackgroundFileID: l.BackgroundFileID,
|
BackgroundFileID: l.BackgroundFileID,
|
||||||
Tasks: []*TaskWithComments{},
|
Tasks: []*TaskWithComments{},
|
||||||
})
|
}
|
||||||
|
nn.Lists = append(nn.Lists, ll)
|
||||||
|
listMap[l.ID] = ll
|
||||||
|
listIDs = append(listIDs, l.ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
namespaceIDs = append(namespaceIDs, n.ID)
|
namespaceIDs = append(namespaceIDs, n.ID)
|
||||||
|
@ -171,15 +176,6 @@ func exportListsAndTasks(s *xorm.Session, u *user.User, wr *zip.Writer) (err err
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
listMap := make(map[int64]*ListWithTasksAndBuckets)
|
|
||||||
listIDs := []int64{}
|
|
||||||
for _, l := range lists {
|
|
||||||
listMap[l.ID] = &ListWithTasksAndBuckets{
|
|
||||||
List: *l,
|
|
||||||
}
|
|
||||||
listIDs = append(listIDs, l.ID)
|
|
||||||
}
|
|
||||||
|
|
||||||
taskMap := make(map[int64]*TaskWithComments, len(tasks))
|
taskMap := make(map[int64]*TaskWithComments, len(tasks))
|
||||||
for _, t := range tasks {
|
for _, t := range tasks {
|
||||||
taskMap[t.ID] = &TaskWithComments{
|
taskMap[t.ID] = &TaskWithComments{
|
||||||
|
|
Loading…
Reference in a new issue