I want to gather all jira issues via REST API.
My current code gets the first 100 rows of data because atlassian limits 100 rows per request.
Now, I have more than 500 rows but I don't know how to get them all instead of only 100 rows:
from collections import Counter
from jira import JIRA
import csv
jira = JIRA(basic_auth=('foo@gmail.com', 'mypassw'), options={'server': 'https://myjira.atlassian.net'})
daten = [issue.key + ';' + str(issue.fields.status) + ';' + issue.fields.summary + ';' + str(issue.fields.customfield_10121) + ';' + '\n' for issue in jira.search_issues('project=dt', maxResults=100)]
daten_enc = u''.join((daten)).encode('utf-8').strip()
print daten_enc
Output is e.g.:
DT-1469;Done;My Summary;ServiceDesk 1;
DT-1468;Done;My Summary;ServiceDesk 2;
DT-1467;Done;My Summary;ServiceDesk 3;
So, it is possible to add a jql query in
jira.search_issues('project=dt & issuekey < issue.key', maxResults=100)
But issue.key should be the last row of 100 rows (e.g. DT-1476).
I need to count 100 rows and then take the last issue.key to add in the above jql query
(jira.search_issues('project=dt & issuekey < issue.key.variable', maxResults=100)