Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions backend/utils/tw/edit_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ func EditTaskInTaskwarrior(
}

if wait != "" {
formattedWait := wait + "T00:00:00"
formattedWait := wait
if !strings.Contains(wait, "T") {
formattedWait = wait + "T00:00:00"
}
modifyArgs = append(modifyArgs, "wait:"+formattedWait)
}

Expand All @@ -60,7 +63,10 @@ func EditTaskInTaskwarrior(
modifyArgs = append(modifyArgs, "depends:"+dependsStr)

if due != "" {
formattedDue := due + "T00:00:00"
formattedDue := due
if !strings.Contains(due, "T") {
formattedDue = due + "T00:00:00"
}
modifyArgs = append(modifyArgs, "due:"+formattedDue)
}

Expand All @@ -82,7 +88,7 @@ func EditTaskInTaskwarrior(
return fmt.Errorf("failed to edit task: %v", err)
}

if len(annotations) >= 0 {
if len(annotations) > 0 {
output, err := utils.ExecCommandForOutputInDir(tempDir, "task", taskUUID, "export")
if err == nil {
var tasks []map[string]interface{}
Expand Down