Skip to content

export: --priority is ignored when --list is given #57

Open

Description

@timimsms

Problem

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.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions