Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

List all the issues of a project with JIRA Python

Hello all,


All the question is in the title, how to list ALL the issues of a project with JIRA python ?

Actually i've done this code :

def simple_issue(projects):

    i = jira.search_issues('issuetype=Bug', maxResults=None)


But it list only 50 issues or less. It is due to the fact that issues during the search are shown by pages containing each 50 issues and the python package cannot access to the next pages. Do you know how could i do ?

Or then not to reach has the list of issues but to reach has the list of issuetypes present in the config of the project?

5 answers

1 accepted

9 votes
Answer accepted
block_size = 100
    block_num = 0
    while True:
        start_idx = block_num*block_size
        issues = jira.search_issues(jql, start_idx, block_size)
        if len(issues) == 0:
            # Retrieve issues until there are no more to come
        block_num += 1
        for issue in issues:
  '%s: %s' % (issue.key, issue.fields.summary))

it works, thank you ! 

Like Kawaljeet Singh likes this

Hi all,

I tried this code and got an error for name 'jql' 


Then later on when I'm done with this error I get a new one for 'log'


Solved how?

Like # people like this
while True:

start_idx = block_num * block_size
if block_num == 0:
issues = jira.search_issues(jql, start_idx, block_size)
more_issue = jira.search_issues(jql, start_idx, block_size)
if len(more_issue)>0:
for x in more_issue:
if len(issues) == 0:
# Retrieve issues until there are no more to come
block_num += 1


for issue in issues:
print('hi %s: %s' % (issue.key, issue.fields.summary))

Have you tried using maxResults=sys.maxint (or sys.maxsize if using Python 3)?

import sys ?



see args of the function...

search_issues(jql_str, startAt=0, maxResults=50, validate_query=True, fields=None, expand=None, json_result=None)


use startAt and maxResults looping round incrementing StartAt by maxResults



def simple_issue(projects):

    i = jira.search_issues("project=project_name", startAt=0, maxResults=50, validate_query=True, fields=None, expand=None, json_result=None)



It list 50 issues too ...

Jeff Atlassian Team Oct 03, 2016

That is because you are still specifying maxResults=50, try changing to maxResults=2000

The server won't return more than a configured number of results at most.

I believe the default is 1000.

Can you please post full python script. I am having issues getting connection 405 error.

405 has nothing to do with your script, it happens when you are attempting to pass back a file that does not have the necessary permissions on the server to receive Post information from another script.

In other words, your script is asking Jira to do something it does not have permissions to do.  Check what you are asking is correct and the user has the correct permissions

Hello Nic


Thanks for response

Here is the script: (I am using Jira 7.4.4 )

import httplib
import urllib
import json

conn = httplib.HTTPConnection("myjira:2002")
args = urllib.urlencode({'username':'myuser', 'password':'mypassword'})
headers = {'accept':'application/json'}
r1 = conn.request("post","/rest/auth/1/session",args, headers)

# --- Authenticate to jira ----------------
r2 = conn.getresponse()
print r1,r2.status,r2.reason,r2


Not sure what is wrong?

Nor do I.  405 means you don't have permission to post.  Are you sure you have the right url, the right user details and that the call you are making is supposed to be a post?  And are you sure python sends it over in the right format?

I am admin on Jira and using same credentials. Is there anyway to find out more info for  debugging.

Url is fine as I use same url for logging from browser.


The call I am making is a post as you can see in code

tested using postman and I get 415 error: Unsupported Meda type



used application/json (lower case A as well)

Logs atlassian-jira-security.log shows this:

http-nio-2002-exec-829 myuser 826x10767233x1 86f8ya /rest/auth/1/session The user 'myuser' has PASSED authentication.

Good morning. Looking at the response:

 i = jira.search_issues("project=project_name", startAt=0, maxResults=50, validate_query=True, fields=None, expand=None, json_result=None)


is there a wildcard that I can use for project? Of course I tried "*" but that didn't work. I haven't been able to figure that out. Thanks.

import jira.client
from jira.client import JIRA

jira_options={'server': ''}


issues_in_project = jira.search_issues('JQL',startAt=0, maxResults=2000, validate_query=True, fields=None, expand=None, json_result=None)

print (issues_in_project)


This will work for you.

Hi Shiva,


Using your code it is giving just 100, where my expected answer is 455.

You can set the startAt index to be something else lets say 200 and maxResults to be 300 and it will give issues within that frame. This way you can find others as well and concatenate them. At a time, it gives max 100 issues only. 

This is a really old question but I was wondering the same thing. My solution is slightly different from the ones mentioned above.

To remove the default limit of 50 issues, set the limit to something like this:

jira.jql(jql, limit=1000)

Hope this was helpful.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

200 views 6 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you