Code Monkey home page Code Monkey logo

Comments (5)

ebaschiera avatar ebaschiera commented on July 4, 2024

Maybe something like this?

        projects = self.paginated_projects(
            included_archived=included_archived,
            expand=expand,
        )
        is_last_page = projects.get("isLast")
        next_page_url = projects.get("nextPage")
        while not is_last_page:
            next_page_projects = self.paginated_projects(
                    included_archived=included_archived,
                    expand=expand,
                    url=next_page_url,
                )
            next_page_url = next_page_projects.get("nextPage")
            is_last_page = next_page_projects.get("isLast")
            projects["values"].extend(
                next_page_projects["values"]
            )
        return projects["values"]

from atlassian-python-api.

marmur1976 avatar marmur1976 commented on July 4, 2024

I experienced this behavior too, this is a pretty bad bug. I don't think it is that unusual to have more than 50 projects. Rolled back to previous version for now.

from atlassian-python-api.

BioSehnsucht avatar BioSehnsucht commented on July 4, 2024

I've just run into this myself, we have just a bit over 50 projects currently and trying to get projects from Cloud never returns with the current release.

I've pinned the version before the PR was merged (atlassian-python-api==3.41.3) and was able to retrieve the project list. So far I haven't run into issues with using an older version, but it would be nice if this was fixed to actually work without needing to do this, as it's possible we'll run into a problem at some point.

from atlassian-python-api.

Spacetown avatar Spacetown commented on July 4, 2024

The usage of the paging in Jira is done in a different way than in . There is an issue from Atlassian still open which looks the same and has already a workaround implemented for BitBucket:

if paging_workaround:
params["page"] += 1

This code should be copied to Jira module and adapted there.

from atlassian-python-api.

Spacetown avatar Spacetown commented on July 4, 2024

Can someone test https://github.com/Spacetown/atlassian-python-api/tree/jira_add_get_paged?

from atlassian-python-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.