Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -2324,14 +2324,17 @@ def projects_from_cloud(self, included_archived=None, expand=None):
included_archived=included_archived,
expand=expand,
)
while not projects.get("isLast"):
projects["values"].extend(
self.paginated_projects(
included_archived=included_archived,
expand=expand,
url=projects["nextPage"],
)["values"]
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"]

def paginated_projects(self, included_archived=None, expand=None, url=None):
Expand Down