Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira API pull all issues

Matthew Stidham September 18, 2024

I am trying to pull all issues from my project using the Jira Python library, and I am pulling some but not all issues. The API is not pulling most of the issues marked Done. What must I do to list all issues in a project made after a certain date?

1 answer

1 vote
Trudy Claspill
Community Champion
September 18, 2024

Hello @Matthew Stidham 

Welcome to the Atlassian community.

Can you provide us with the details of the API call you are making and any parameters you are providing in that call?

We can't really diagnose what might be the problem without seeing what you are actually doing.

Also, what is the total number of issues you are getting back in your results?

Matthew Stidham September 20, 2024

I'm using the get_all_project_issues endpoint in the Python jira API.


i = 0
chunk_size = 500
while True:
chunk = self.jira_client.get_all_project_issues(project=project_name, start=i, limit=chunk_size)
i += chunk_size
issues += chunk
if i >= len(chunk):
break

self.jira_client is an object which points to the Jira Python module.

Trudy Claspill
Community Champion
September 20, 2024

What is the total number of issues you are getting back in your results?

What is the total number of issues you think you should be getting?

You asked about getting "issues in a project made after a certain date".  Is that an enhancement you want to make? Your current methodology appears to be getting all issues without limiting when they were created

Matthew Stidham September 20, 2024

It's not grabbing issues that were closed recently.

Trudy Claspill
Community Champion
September 20, 2024

What is the total number of issues you are getting back in your results?

What is the total number of issues you think you should be getting?

Matthew Stidham September 20, 2024

The main issue is that I am not grabbing any issues that have been marked as done since January, and we finish issues every day.

Matthew Stidham September 20, 2024

I don't know exactly how many there are because the number changes every day, but it should not be zero.

Trudy Claspill
Community Champion
September 20, 2024

Are you getting 1000 issues or more or less than 1000 issues?

I am asking because natively Jira limits results to 1000 issues in total and pagination has to be used to retrieve more. I've not yet reviewed the Python API to see if it built pagination into its endpoint.

Matthew Stidham September 20, 2024

We are getting 331 cards, so far fewer than 1000.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events