Skip to content

fix(jtk): issues search does not auto-paginate past first page #181

@rianjs

Description

@rianjs

Problem

jtk issues search returns at most 100 results regardless of the --max value. The Jira /rest/api/3/search/jql endpoint caps at 100 per page and returns a nextPageToken for cursor-based pagination, but jtk doesn't follow it.

Reproduction

# Request 200, only get 100
jtk issues search \
  --jql 'resolutiondate >= "2026-02-01" AND resolutiondate < "2026-03-01" AND status not in (Canceled)' \
  -o json --max 200 | jq '.issues | length'
# => 100

# Pagination metadata confirms more pages exist
jtk issues search \
  --jql 'resolutiondate >= "2026-02-01" AND resolutiondate < "2026-03-01" AND status not in (Canceled)' \
  -o json --max 200 | jq '.pagination'
# => {"pageSize": 200, "isLast": false, "nextPageToken": "ChkjU3Ry..."}

Feb 2026 has 200+ resolved tickets, so only getting the first 100 produces incomplete results.

Expected Behavior

jtk issues search --max 200 should follow nextPageToken until either isLast: true or the --max limit is reached, accumulating results across pages.

Version

jtk version 1.0.45

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions