Skip to content

Add dedicated method for the fetching all values #945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion atlassian/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.20.0
3.20.1
31 changes: 30 additions & 1 deletion atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -2586,7 +2586,36 @@ def jql(self, jql, fields="*all", start=0, limit=None, expand=None, validate_que
fixed system limits. Default by built-in method: 50
:param expand: OPTIONAL: expand the search result
:param validate_query: Whether to validate the JQL query
:param advanced_mode: Make an advanced mode
:return:
"""
params = {}
if start is not None:
params["startAt"] = int(start)
if limit is not None:
params["maxResults"] = int(limit)
if fields is not None:
if isinstance(fields, (list, tuple, set)):
fields = ",".join(fields)
params["fields"] = fields
if jql is not None:
params["jql"] = jql
if expand is not None:
params["expand"] = expand
if validate_query is not None:
params["validateQuery"] = validate_query
url = self.resource_url("search")
return self.get(url, params=params)

def jql_get_list_of_tickets(self, jql, fields="*all", start=0, limit=None, expand=None, validate_query=None):
"""
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: Whether to validate the JQL query
:return:
"""
params = {}
Expand Down