Skip to content

[CTORNDGAIN-1199] Fix load_stories.py silently truncating at 50 stories#40

Merged
isolomatov-gd merged 1 commit intomainfrom
feature/ctorndgain-1199-fix-load-stories-pagination
Mar 25, 2026
Merged

[CTORNDGAIN-1199] Fix load_stories.py silently truncating at 50 stories#40
isolomatov-gd merged 1 commit intomainfrom
feature/ctorndgain-1199-fix-load-stories-pagination

Conversation

@github-actions
Copy link
Contributor

Jira Story

https://griddynamics.atlassian.net/browse/CTORNDGAIN-1199

Summary

  • Replaced single-page fetch_story_issues() with a pagination loop using startAt offset
  • Loop accumulates issues from all pages until start_at >= total or an empty page is returned
  • Return shape {"issues": [...]} is unchanged — callers are unaffected
  • page_size kept at 50; no hard-coded limit remains

Testing Notes

  • Updated test_fetch_story_issues_uses_enhanced_search_endpoint to expect ?maxResults=50&startAt=0 and total in the fake response
  • Added test_fetch_story_issues_paginates_all_results: fake request returns page 1 (2 issues, total=3) then page 2 (1 issue, total=3); asserts all 3 issues returned and exactly 2 HTTP calls made
  • All 3 tests pass: pytest .github/scripts/test_load_stories.py

Assumptions

  • None. The Jira /rest/api/3/search/jql endpoint has supported startAt and returns total since API v3.

🤖 Generated with Claude Code

Replace single-page fetch_story_issues() with a pagination loop using
startAt/total so all Jira stories beyond the first 50 are returned.
Update existing test and add pagination test verifying two-page fetch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions bot requested a review from kkhristenko51 as a code owner March 25, 2026 03:10
@isolomatov-gd isolomatov-gd merged commit e417f65 into main Mar 25, 2026
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.

3 participants