Skip to content

fix(jira): handle JIRA Cloud API v3 pagination format#1

Open
sfvishalgupta wants to merge 1 commit intoCheckUnitTestCasesfrom
test-jira-fix-1765968054
Open

fix(jira): handle JIRA Cloud API v3 pagination format#1
sfvishalgupta wants to merge 1 commit intoCheckUnitTestCasesfrom
test-jira-fix-1765968054

Conversation

@sfvishalgupta
Copy link
Copy Markdown
Collaborator

Summary

This PR fixes the issue where JIRA search results showed '0 total issues' despite finding issues.

Root Cause

JIRA Cloud API v3 changed their pagination format:

  • Old format: total, maxResults, startAt
  • New format: nextPageToken, isLast (no total field)

Changes

  • Updated JiraService.searchIssues() to detect and handle both pagination formats
  • Calculate total from isLast flag when using new format
  • Maintain backward compatibility with old format
  • Ensure proper fallback values for maxResults

Testing

✅ Tested with JIRA Cloud API - correctly shows issue counts
✅ Backward compatible with old API format

Impact

  • Fixes #N/A
  • Affects: All JIRA search operations in the quality analyzer

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant