summaryrefslogtreecommitdiff
path: root/internal/askcli/command_write_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-23 08:03:40 +0200
committerPaul Buetow <paul@buetow.org>2026-03-23 08:03:40 +0200
commitba929c035c7c74113d061c57cc5b500af0b20b74 (patch)
tree6555fd5e6b5589fe6c3d3b76b9cc33726dce7cdd /internal/askcli/command_write_test.go
parent8f2a9f110b10b721d40dab1ce13475b56bac6ee7 (diff)
fix: use uuid:<uuid> filter for start/stop/done/annotate/modify commands
Taskwarrior expects the filter before the action verb. Commands like 'task start <uuid>' are invalid — the UUID must be part of the filter: 'task uuid:<uuid> start'. All mutation commands now use this pattern consistently, matching how priority/tag/denotate already worked. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/askcli/command_write_test.go')
-rw-r--r--internal/askcli/command_write_test.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/internal/askcli/command_write_test.go b/internal/askcli/command_write_test.go
index f0e062d..2e494db 100644
--- a/internal/askcli/command_write_test.go
+++ b/internal/askcli/command_write_test.go
@@ -201,12 +201,14 @@ func TestAllWriteHandlers_PassCorrectArgs(t *testing.T) {
args []string
wantArgs []string
}{
+ // All commands use uuid:<uuid> as the filter so taskwarrior selects
+ // the exact task; the action verb and any arguments follow.
{"denotate", []string{"denotate", "my-uuid", "text"}, []string{"uuid:my-uuid", "denotate", "text"}},
- {"modify", []string{"modify", "my-uuid", "priority:H"}, []string{"modify", "my-uuid", "priority:H"}},
- {"annotate", []string{"annotate", "my-uuid", "note"}, []string{"annotate", "my-uuid", "note"}},
- {"start", []string{"start", "my-uuid"}, []string{"start", "my-uuid"}},
- {"stop", []string{"stop", "my-uuid"}, []string{"stop", "my-uuid"}},
- {"done", []string{"done", "my-uuid"}, []string{"done", "my-uuid"}},
+ {"modify", []string{"modify", "my-uuid", "priority:H"}, []string{"uuid:my-uuid", "modify", "priority:H"}},
+ {"annotate", []string{"annotate", "my-uuid", "note"}, []string{"uuid:my-uuid", "annotate", "note"}},
+ {"start", []string{"start", "my-uuid"}, []string{"uuid:my-uuid", "start"}},
+ {"stop", []string{"stop", "my-uuid"}, []string{"uuid:my-uuid", "stop"}},
+ {"done", []string{"done", "my-uuid"}, []string{"uuid:my-uuid", "done"}},
{"priority", []string{"priority", "my-uuid", "H"}, []string{"uuid:my-uuid", "modify", "priority:H"}},
{"tag", []string{"tag", "my-uuid", "+cli"}, []string{"uuid:my-uuid", "modify", "+cli"}},
}