Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,585
Community Members
 
Community Events
165
Community Groups

Not able to extract more than 500 issues using jira python api.

 i am using Jira-python API to extract description and summary from jiras in my project. My project has around 1700 issues. but i am only able to extract a max of 500 issues. I am extracting all issues in a data frame using pandas.  i followed this approach given in this link . But unable to fix it. kindly help.

extracting data from jira

 

from jira import JIRA
jira = JIRA('https://jira.spring.io')
block_size = 1000
block_num = 0
allissues = []
while True:
start_idx = block_num*block_size
issues = jira.search_issues('project=XD', start_idx, block_size)
if len(issues) == 0:
# Retrieve issues until there are no more to come
break
block_num += 1
for issue in issues:
#log.info('%s: %s' % (issue.key, issue.fields.summary))
allissues.append(issue)

 

2 answers

1 accepted

1 vote
Answer accepted

Hello @xoxo ,

 

What is the value of your server's jira.search.views.default.max (found in System > Advance Settings)? By any chance is it 250? 

I am not that familiar with Jira-python API but I believe it is calling Jira server's Search REST API underneath the hood, hence, jira.search.views.default.max will be used as the limit.

If your jira.search.views.default.max is not 1000, try changing your block_size to your default max value, then I think it should be ok.

 

Cheers,

Ian

0 votes
4 D I'm New Here Jun 08, 2022

Hi,

it should be possible to use the maxResults parameter in your call "jira.search_issues", for example "maxResults=1000"

 

If you need to get more than 1000 items, just try "maxResults=False" that allows retreiving all possible items without limitation

Suggest an answer

Log in or Sign up to answer
TAGS

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