Add more logs
continuous-integration/drone/pr Build was killed
Details
continuous-integration/drone/pr Build was killed
Details
This commit is contained in:
parent
48ba761a97
commit
241b1229ae
|
@ -255,14 +255,23 @@ func convertMicrosoftTodoData(todoData []*list) (vikunjsStructure []*models.Name
|
|||
},
|
||||
}
|
||||
|
||||
log.Debugf("[Microsoft Todo Migration] Converting %d lists", len(todoData))
|
||||
|
||||
for _, l := range todoData {
|
||||
|
||||
log.Debugf("[Microsoft Todo Migration] Converting list %s", l.ID)
|
||||
|
||||
// Lists only with title
|
||||
list := &models.List{
|
||||
Title: l.DisplayName,
|
||||
}
|
||||
|
||||
log.Debugf("[Microsoft Todo Migration] Converting %d tasks", len(l.Tasks))
|
||||
|
||||
for _, t := range l.Tasks {
|
||||
|
||||
log.Debugf("[Microsoft Todo Migration] Converting task %s", t.ID)
|
||||
|
||||
task := &models.Task{
|
||||
Title: t.Title,
|
||||
Done: t.Status == "completed",
|
||||
|
@ -270,6 +279,7 @@ func convertMicrosoftTodoData(todoData []*list) (vikunjsStructure []*models.Name
|
|||
|
||||
// Done Status
|
||||
if task.Done {
|
||||
log.Debugf("[Microsoft Todo Migration] Converting done at for task %s", t.ID)
|
||||
task.DoneAt, err = t.CompletedDateTime.toTime()
|
||||
if err != nil {
|
||||
return
|
||||
|
@ -295,6 +305,7 @@ func convertMicrosoftTodoData(todoData []*list) (vikunjsStructure []*models.Name
|
|||
|
||||
// Reminders
|
||||
if t.ReminderDateTime != nil {
|
||||
log.Debugf("[Microsoft Todo Migration] Converting reminder for task %s", t.ID)
|
||||
reminder, err := t.ReminderDateTime.toTime()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -305,6 +316,7 @@ func convertMicrosoftTodoData(todoData []*list) (vikunjsStructure []*models.Name
|
|||
|
||||
// Due Date
|
||||
if t.DueDateTime != nil {
|
||||
log.Debugf("[Microsoft Todo Migration] Converting due date for task %s", t.ID)
|
||||
dueDate, err := t.DueDateTime.toTime()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -315,6 +327,7 @@ func convertMicrosoftTodoData(todoData []*list) (vikunjsStructure []*models.Name
|
|||
|
||||
// Repeating
|
||||
if t.Recurrence != nil && t.Recurrence.Pattern != nil {
|
||||
log.Debugf("[Microsoft Todo Migration] Converting recurring pattern for task %s", t.ID)
|
||||
switch t.Recurrence.Pattern.Type {
|
||||
case "daily":
|
||||
task.RepeatAfter = t.Recurrence.Pattern.Interval * 60 * 60 * 24
|
||||
|
@ -328,9 +341,11 @@ func convertMicrosoftTodoData(todoData []*list) (vikunjsStructure []*models.Name
|
|||
}
|
||||
|
||||
list.Tasks = append(list.Tasks, task)
|
||||
log.Debugf("[Microsoft Todo Migration] Done converted %d tasks", len(l.Tasks))
|
||||
}
|
||||
|
||||
vikunjsStructure[0].Lists = append(vikunjsStructure[0].Lists, list)
|
||||
log.Debugf("[Microsoft Todo Migration] Done converting list %s", l.ID)
|
||||
}
|
||||
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue