-
Notifications
You must be signed in to change notification settings - Fork 1
fix(jtk): issues search does not auto-paginate past first page #181
Copy link
Copy link
Closed
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels