how to get data from jira using python code example
Example: how to fetch data from jira in python
import jira.clientfrom jira.client import JIRAfrom openpyxl import Workbookjira_options={'server': 'http://example.com'}jira=JIRA(options=jira_options,basic_auth=('admin','password'))key_list = []summary_list = []#Add additional lists for fields here#Example: #description_list = []issues_in_project = jira.search_issues('project=ALPHA AND assignee= admin')for issue in issues_in_project: key_list.append(issue.key) summary_list.append(issue.fields.summary)# Add additional fields returned here# Example:#. description_list.append(issue.fields.description)wb = Workbook()ws = wb.activekey_row = 1summary_row = 1#add additional "$FIELD_row = 1" entries here so the field results start at row 1#Example:#description_row = 1start_column = 1for key in key_list: ws.cell(row=key_row, column=start_column).value = key key_row += 1for summary in summary_list: ws.cell(row=summary_row, column=start_column+1).value = summary summary_row += 1# add additional fields here #Example:#for description in description_list: # ws.cell(row=description_row, column=start_column+2).value = description # description_row += 1wb.save("jira-report.xlsx")