Skip to content
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
8 changes: 8 additions & 0 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -2073,6 +2073,14 @@ def get_project_issues_count(self, project):
return self.jql(jql, fields="*none")["total"]

def get_all_project_issues(self, project, fields="*all", start=0, limit=None):
"""
Get the Issues for a Project
:param project: Project Key name
:param fields: OPTIONAL list<str>: List of Issue Fields
:param start: OPTIONAL int: Starting index/offset from the list of target issues
:param limit: OPTIONAL int: Total number of project issues to be returned
:return: List of Dictionary for the Issue(s) returned.
"""
jql = "project = {project} ORDER BY key".format(project=project)
return self.jql(jql, fields=fields, start=start, limit=limit)["issues"]

Expand Down
19 changes: 19 additions & 0 deletions examples/jira/jira_issues_get_all_projects.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# coding=utf-8
"""
Getting Project Issue(s) example
"""


from atlassian import Jira


jira = Jira(url="https://jirasite.co", username="ocean", password="seariver")


if __name__ == "__main__":
# default will return 50 issues in ascending order
project_issues_default_50 = jira.get_all_project_issues(project="APA")
# We can increase the limit by specifying the limit
project_issues_100 = jira.get_all_project_issues(project="APA", limit=100)
# Specifying specific fields other than the default jira fields returned
project_issues_specific = jira.get_all_project_issues(project="APA", fields=["description", "summary"], limit=100)