Context
cu task close and cu bulk close set the task status to the hardcoded string "complete". ClickUp statuses are per-list and user-defined, so on any list whose done/closed status has a different name (e.g. "Done", "Closed", "Shipped"), the close command fails with an API error.
Evidence
internal/cmd/task.go:402-407 (TODO at 404):
// Find a closed status in the same list
// For now, we'll use "complete" as the closed status
// TODO: Query the list's statuses to find the actual closed status
updateOpts := &api.TaskUpdateOptions{
Status: "complete",
}
internal/cmd/bulk.go:209 — bulk close has the same hardcoded Status: "complete".
Suggested fix
Resolve the list's actual closed status before updating: fetch the task's list statuses (list detail includes statuses[] with type fields) and pick the status with type == "closed" (or "done" as fallback). Apply the same resolution in both task close and bulk close, and cover it with a test using a list whose closed status is not named "complete".
Context
cu task closeandcu bulk closeset the task status to the hardcoded string"complete". ClickUp statuses are per-list and user-defined, so on any list whose done/closed status has a different name (e.g. "Done", "Closed", "Shipped"), the close command fails with an API error.Evidence
internal/cmd/task.go:402-407(TODO at 404):internal/cmd/bulk.go:209—bulk closehas the same hardcodedStatus: "complete".Suggested fix
Resolve the list's actual closed status before updating: fetch the task's list statuses (list detail includes
statuses[]withtypefields) and pick the status withtype == "closed"(or"done"as fallback). Apply the same resolution in bothtask closeandbulk close, and cover it with a test using a list whose closed status is not named "complete".