Skip to content

Paginating a query #149

@hroncok

Description

@hroncok

Hello, I've been told via internal RH channels that bugzilla search results will soon be paginated. It seems that I've already been hit by this issue in one of my scripts.

Consider this:

>>> import bugzilla
>>> bz = bugzilla.Bugzilla("https://bugzilla.redhat.com")
>>> ftibug = bz.getbug("F35FailsToInstall")
>>> query_fti = bz.build_query(product="Fedora")
>>> query_fti["blocks"] = ftibug.id
>>> results = bz.query(query_fti)
>>> len(results)
1000
>>> type(results)
<class 'list'>

I see that actually, the number should be 1130.

How do I paginate via the library?


EDIT on 2021-09-13 The default limit is now 20, so the above example will give:

>>> ...
>>> len(results)
20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions