Skip to content

Commit 254c250

Browse files
authored
Remove workaround
1 parent 3d4b8b9 commit 254c250

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

atlassian/jira.py

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def _get_paged(
3232
flags=None,
3333
trailing=None,
3434
absolute=False,
35-
paging_workaround=False,
3635
):
3736
"""
3837
Used to get the paged data
@@ -43,17 +42,13 @@ def _get_paged(
4342
:param flags: string[] (default is None): The flags
4443
:param trailing: bool (default is None): If True, a trailing slash is added to the url
4544
:param absolute: bool (default is False): If True, the url is used absolute and not relative to the root
46-
:param paging_workaround: bool (default is False): If True, the paging is done on our own because
47-
of https://jira.atlassian.com/browse/BCLOUD-13806
4845
4946
:return: A generator object for the data elements
5047
"""
5148

5249
if self.cloud:
5350
if params is None:
5451
params = {}
55-
if paging_workaround:
56-
params["startAt"] = 0
5752

5853
while True:
5954
response = super(Jira, self).get(
@@ -71,18 +66,15 @@ def _get_paged(
7166
if response.get("isLast", False) or len(values) == 0:
7267
break
7368

74-
if paging_workaround:
75-
params["startAt"] += response["maxResults"]
76-
else:
77-
url = response.get("nextPage")
78-
if url is None:
79-
break
80-
# From now on we have absolute URLs with parameters
81-
absolute = True
82-
# Params are now provided by the url
83-
params = {}
84-
# Trailing should not be added as it is already part of the url
85-
trailing = False
69+
url = response.get("nextPage")
70+
if url is None:
71+
break
72+
# From now on we have absolute URLs with parameters
73+
absolute = True
74+
# Params are now provided by the url
75+
params = {}
76+
# Trailing should not be added as it is already part of the url
77+
trailing = False
8678
else:
8779
raise ValueError("``_get_paged`` method is only available for Jira Cloud platform")
8880

0 commit comments

Comments
 (0)