jira icon indicating copy to clipboard operation
jira copied to clipboard

YAP (Yet Another Pager)

Open turran opened this issue 3 years ago • 1 comments

This is yet another proposal to support pagination in Jira Results. There is already a discussion at #885 and an initial implementation at #1010

The implementation extends ResultList to keep track of how it was generated (actually the parameters of _fetch_pages) and defines a new class that based on that information and the JIRA instance will paginate starting on the original startAt and in batches of maxResults.

The difference between this and #1010 is that the original approach of generating an in-memory list in _fetch_pages is kept and pages are requested on-demand for elements after maxResults in maxResults batches.

The usage will be something like this:

from jira import JIRA
j = JIRA(...)
# Fetch batches of 2 results per page
for i in j.paginator(j.search_issues("", maxResults=2)):
    print(i)

The PR can be found at #1113. I haven't completed all the contributions guidelines expecting to have a go on the approach to finish the missing parts.

turran avatar Aug 03 '21 22:08 turran

Hello, are there any news about this proposal? Shall I go ahead with the full implementation?

turran avatar Oct 25 '21 10:10 turran