Hi , I am new in using JIRA API through python, had a few questions, I am using Jql to get required fields from a particular EPIC but I am only getting 50 results, is there a way I can increase the limit?
Also the fields like summary and decription are being truncated in the dataframe, how can I solve that? Thanks!!
jql = "\"Epic Link\" = ''ABG-463' AND issuetype = Story ORDER BY priority DESC, key DESC MAXRESULTS 200"
Hi Harshita,
"maxResults" should not be included directly in the JQL, rather it should be sent as an additional parameter to the Jira rest api.
depending on what method you are using to make the rest call, it should look something like this:
jira.search_issues(jql, maxResults=1000)
Let me know if this helps, if not, can you please provide the code snippit where you are making the call using your jql string?
Thanks!
Thanks, @omcg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Update
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do not know if you are talking about the Atlassian Python Jira Library (installed with pip install atlassian-python-api), it seems not.
If you are using atlassian-python-api then the documentation is terrible but a look at the code reveals the following parameters for the jql method:
Get issues from jql search result with all related fields
:param jql:
:param fields: list of fields, for example: ['priority', 'summary', 'customfield_10007']
:param start: OPTIONAL: The start point of the collection to return. Default: 0.
:param limit: OPTIONAL: The limit of the number of issues to return, this may be restricted by
fixed system limits. Default by built-in method: 50
:param expand: OPTIONAL: expand the search result
:param validate_query: OPTIONAL: Whether to validate the JQL query
The limit did not seem to work properly, but start does so I make repeated calls.
def parse_jira(jira, jql_request, existing={}):
"""Generate a query based on the jql_request given to the jira instance given
"""
for results in range(0,1000,50):
found = {item['key']: Requirement(item) for item in jira.jql(jql_request, start=results)['issues']}
existing.update(found)
if len(found) < 50:
break;
return existing
Where Requirement is a class that is filled with the data.
I hope this helps people.
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.