@@ -3346,18 +3346,15 @@ def jql(
3346
3346
:return:
3347
3347
"""
3348
3348
if self .cloud :
3349
- if start == 0 :
3349
+ if start == 0 :
3350
3350
return self .enhanced_jql (
3351
3351
jql = jql ,
3352
3352
fields = fields ,
3353
3353
limit = limit ,
3354
3354
expand = expand ,
3355
3355
)
3356
3356
else :
3357
- raise ValueError (
3358
- "The `jql` method is deprecated in Jira Cloud. Use `enhanced_jql` method instead."
3359
- )
3360
-
3357
+ raise ValueError ("The `jql` method is deprecated in Jira Cloud. Use `enhanced_jql` method instead." )
3361
3358
params = {}
3362
3359
if start is not None :
3363
3360
params ["startAt" ] = int (start )
@@ -3397,7 +3394,6 @@ def enhanced_jql(
3397
3394
3398
3395
if not self .cloud :
3399
3396
raise ValueError ("``enhanced_jql`` method is only available for Jira Cloud platform" )
3400
-
3401
3397
params = {}
3402
3398
if nextPageToken is not None :
3403
3399
params ["nextPageToken" ] = str (nextPageToken )
@@ -3411,7 +3407,6 @@ def enhanced_jql(
3411
3407
params ["jql" ] = jql
3412
3408
if expand is not None :
3413
3409
params ["expand" ] = expand
3414
-
3415
3410
url = self .resource_url ("search/jql" )
3416
3411
return self .get (url , params = params )
3417
3412
@@ -3455,7 +3450,7 @@ def jql_get_list_of_tickets(
3455
3450
:return:
3456
3451
"""
3457
3452
if self .cloud :
3458
- if start == 0 :
3453
+ if start == 0 :
3459
3454
return self .enhanced_jql_get_list_of_tickets (
3460
3455
jql = jql ,
3461
3456
fields = fields ,
@@ -3488,7 +3483,7 @@ def jql_get_list_of_tickets(
3488
3483
response = self .get (url , params = params )
3489
3484
if not response :
3490
3485
break
3491
-
3486
+
3492
3487
issues = response ["issues" ]
3493
3488
results .extend (issues )
3494
3489
total = int (response ["total" ])
@@ -3536,21 +3531,20 @@ def enhanced_jql_get_list_of_tickets(
3536
3531
3537
3532
url = self .resource_url ("search/jql" )
3538
3533
results = []
3539
- nextPageToken = None
3534
+ next_page_token = None
3540
3535
3541
3536
while True :
3542
- if nextPageToken is not None :
3543
- params ["nextPageToken" ] = nextPageToken
3537
+ if next_page_token is not None :
3538
+ params ["nextPageToken" ] = next_page_token
3544
3539
3545
3540
response = self .get (url , params = params )
3546
3541
if not response :
3547
3542
break
3548
-
3543
+
3549
3544
issues = response ["issues" ]
3550
3545
results .extend (issues )
3551
-
3552
- nextPageToken = response .get ("nextPageToken" )
3553
- if not nextPageToken or (limit is not None and len (results ) >= limit ):
3546
+ next_page_token = response .get ("nextPageToken" )
3547
+ if not next_page_token or (limit is not None and len (results ) >= limit ):
3554
3548
break
3555
3549
return results
3556
3550
0 commit comments