in releasedocmaker/src/main/python/releasedocmaker/jira.py [0:0]
def collect_jiras(jira_base_url, ver, projects):
"""send queries to JIRA and collect all issues
that belongs to given version and projects"""
jiras = []
pos = 0
end = 1
while pos < end:
data = JiraIter.query_jira(jira_base_url, ver, projects, pos)
if 'error_messages' in data:
logging.error("JIRA returns error message: %s",
data['error_messages'])
sys.exit(1)
pos = data['startAt'] + data['maxResults']
end = data['total']
jiras.extend(data['issues'])
if ver not in RELEASE_VERSION:
for issue in data['issues']:
for fix_version in issue['fields']['fixVersions']:
if 'releaseDate' in fix_version:
RELEASE_VERSION[fix_version['name']] = fix_version[
'releaseDate']
return jiras