Skip to content

Commit a9981bc

Browse files
[JIRA] Add more available params to the get issues for board query (#738)
* [JIRA] Add more available params to the get issues for board query * Fix formatting error
1 parent a605e19 commit a9981bc

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

atlassian/jira.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3394,12 +3394,34 @@ def get_issues_for_backlog(self, board_id):
33943394
url = "rest/agile/1.0/{board_id}/backlog".format(board_id=board_id)
33953395
return self.get(url)
33963396

3397-
def get_issues_for_board(self, board_id):
3397+
def get_issues_for_board(self, board_id, jql, fields="*all", start=0, limit=None, expand=None):
33983398
"""
3399+
Get issues for board
33993400
:param board_id: int, str
3401+
:param jql:
3402+
:param fields: list of fields, for example: ['priority', 'summary', 'customfield_10007']
3403+
:param start: OPTIONAL: The start point of the collection to return. Default: 0.
3404+
:param limit: OPTIONAL: The limit of the number of issues to return, this may be restricted by
3405+
fixed system limits. Default by built-in method: 50
3406+
:param expand: OPTIONAL: expand the search result
3407+
:return:
34003408
"""
3409+
params = {}
3410+
if start is not None:
3411+
params["startAt"] = int(start)
3412+
if limit is not None:
3413+
params["maxResults"] = int(limit)
3414+
if fields is not None:
3415+
if isinstance(fields, (list, tuple, set)):
3416+
fields = ",".join(fields)
3417+
params["fields"] = fields
3418+
if jql is not None:
3419+
params["jql"] = jql
3420+
if expand is not None:
3421+
params["expand"] = expand
3422+
34013423
url = "rest/agile/1.0/board/{board_id}/issue".format(board_id=board_id)
3402-
return self.get(url)
3424+
return self.get(url, params=params)
34033425

34043426
def delete_agile_board(self, board_id):
34053427
"""

0 commit comments

Comments
 (0)