using the following python code I get a returned value of 5000 worklogs for any issue that I input:
jira = JIRA(options, basic_auth=(user,apikey))
jira.worklogs(issue='ABC-123')
This wasn't the case about a month ago. Is there any workaround for this or a change I can make to my python code to only get the most recent worklogs for a specific issue via jql or something?
Hello @kleb12
You seem to be using some third party Python module which is providing that jira.worklogs() function. Have you checked with the publisher of that module?
The v3 REST API of Jira Cloud has always returned 5,000 worklogs per issue per request by default and you need to use the startAt parameter to move to next page of worklog records (read the docs), so it's not clear how you were able to get more results than that before.
What happens when you make a raw query to the REST API endpoint with a test tool like Postman etc?
Hi
I´ve been using the jira module that I believe is the official one and the worklogs function doesn't have a maxResults parameter.
This is my code (with credentials and issue name removed):
from jira import JIRA
import jira
jira_options = {'server':server}
credentials = (email,token)
client = JIRA(options = jira_options,basic_auth = credentials)
issue = client.issue('myissue')
print(a.fields.worklog.total) # This line prints 9574 in my case.
# Can't use maxResults, I get:
# TypeError: worklogs() got an unexpected keyword argument 'maxResults'
work = self.client.worklogs(issue = issue) # Without maxResults it works.
print(len(work)) # This line prints 5000.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.