fix(tasks): clear due date with empty flag

This commit is contained in:
Peter Steinberger 2026-04-20 14:16:57 +01:00
parent 0aa06b4706
commit 570294cdbd
No known key found for this signature in database

View File

@ -491,14 +491,18 @@ func (c *TasksUpdateCmd) Run(ctx context.Context, kctx *kong.Context, flags *Roo
changed = true
}
if flagProvided(kctx, "due") {
if !outfmt.IsJSON(ctx) {
warnTasksDueTime(u, c.Due)
}
dueValue, dueErr := normalizeTaskDue(c.Due)
if dueErr != nil {
return dueErr
}
patch.Due = dueValue
if dueValue == "" {
patch.NullFields = append(patch.NullFields, "Due")
} else {
if !outfmt.IsJSON(ctx) {
warnTasksDueTime(u, c.Due)
}
patch.Due = dueValue
}
changed = true
}
if flagProvided(kctx, "status") {