You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
export: --priority is ignored when --list is given #57
cu export tasks --list <id> --priority high exports every task in the list, whatever its priority.
Cause
In internal/cmd/export.go, the --list branch maps --priority onto api.TaskQueryOptions.Priority, but ListTasksAllPages never reads that field, so it is never sent to ClickUp. That branch also skips the client-side filterTasksForExport that the workspace/space branch applies for priority. Get Filtered Team Tasks has no priority parameter, and neither does Get Tasks (list), so this filter has to happen client-side.
This was already the case before v0.3.0. It was found while reviewing #48.
Fix
Apply filterTasksForExport(tasks, "", priority, "") after fetching in the --list branch, as the other branch does. Then remove the dead Priority mapping, or stop the option struct from advertising a field that is never sent. Add a test with an httptest server that returns mixed priorities.
Activity