Minor Enhancements

This commit is contained in:
Zimmerberger Markus
2024-06-26 13:26:05 +02:00
parent e5189f0d8c
commit 7ac6594292
2 changed files with 19 additions and 10 deletions
+13 -7
View File
@@ -29,9 +29,10 @@ cell_format.set_bold()
worksheet.write(row, col, 'Story' , cell_format) worksheet.write(row, col, 'Story' , cell_format)
worksheet.write(row, col + 1, 'Sub-Task' , cell_format) worksheet.write(row, col + 1, 'Sub-Task' , cell_format)
worksheet.write(row, col + 2, 'Summary' , cell_format) worksheet.write(row, col + 2, 'Summary' , cell_format)
worksheet.write(row, col + 3, 'timeoriginalestimate', cell_format) worksheet.write(row, col + 3, 'Labels' , cell_format)
worksheet.write(row, col + 4, 'SP' , cell_format) worksheet.write(row, col + 4, 'timeoriginalestimate', cell_format)
worksheet.write(row, col + 5, 'PT' , cell_format) worksheet.write(row, col + 5, 'SP' , cell_format)
worksheet.write(row, col + 6, 'PT' , cell_format)
row += 1 row += 1
headers = JIRA.DEFAULT_OPTIONS["headers"].copy() headers = JIRA.DEFAULT_OPTIONS["headers"].copy()
@@ -39,7 +40,7 @@ headers["Authorization"] = f"Bearer {pat}"
jira_server = JIRA(server=host, options={"headers": headers}) jira_server = JIRA(server=host, options={"headers": headers})
# use filter or single issue # use filter or single issue
issues_Jql = jira_server.search_issues('filter=25827') #, expand='changelog') issues_Jql = jira_server.search_issues('filter=28412') #, expand='changelog')
#issues_Jql = jira_server.search_issues('key in (wrgwr-2838, wrgwr-2839)', expand='changelog') #issues_Jql = jira_server.search_issues('key in (wrgwr-2838, wrgwr-2839)', expand='changelog')
#issues_Jql = jira_server.search_issues('key in (DKARB-140)') #, expand='changelog') #issues_Jql = jira_server.search_issues('key in (DKARB-140)') #, expand='changelog')
#issues_Jql = jira_server.search_issues('labels in (Refinement11012022) AND type not in (Bug) AND status not in (Done) and ("Story Points" is EMPTY or "Story Points" = 0)') #, expand='changelog') #issues_Jql = jira_server.search_issues('labels in (Refinement11012022) AND type not in (Bug) AND status not in (Done) and ("Story Points" is EMPTY or "Story Points" = 0)') #, expand='changelog')
@@ -58,9 +59,14 @@ for issue in issues_Jql:
worksheet.write(row, col, issue.key) worksheet.write(row, col, issue.key)
worksheet.write(row, col + 1, ssubtask.key) worksheet.write(row, col + 1, ssubtask.key)
worksheet.write(row, col + 2, ssubtask.fields.summary) worksheet.write(row, col + 2, ssubtask.fields.summary)
worksheet.write(row, col + 3, ssubtask.fields.timeoriginalestimate) alllabels = []
worksheet.write(row, col + 4, f'=D{row + 1}/28800') labels = ssubtask.fields.labels
worksheet.write(row, col + 5, f'=E{row + 1}/0.5') for i in labels:
alllabels.append(i)
worksheet.write(row, col + 3, ','.join(alllabels, ))
worksheet.write(row, col + 4, ssubtask.fields.timeoriginalestimate)
worksheet.write(row, col + 5, f'=E{row + 1}/28800')
worksheet.write(row, col + 6, f'=F{row + 1}/0.5')
row += 1 row += 1
worksheet.autofit() worksheet.autofit()
+5 -2
View File
@@ -43,6 +43,9 @@ def get_assignee(type, issue):
elif type == 'Dev Citizen-Frontend': elif type == 'Dev Citizen-Frontend':
return 'reu9001' return 'reu9001'
elif type.startswith('Test-Anpassung'): elif type.startswith('Test-Anpassung'):
if issue.key.startswith('WRGWR-'):
return 'ada9001'
else:
return 'osm9005' return 'osm9005'
def create_subtask(issue, parent, type, subtask_sp, estimation_remark): def create_subtask(issue, parent, type, subtask_sp, estimation_remark):
@@ -110,8 +113,8 @@ headers["Authorization"] = f"Bearer {pat}"
jira_server = JIRA(server=host, options={"headers": headers}) jira_server = JIRA(server=host, options={"headers": headers})
# use filter or single issue # use filter or single issue
#issues_Jql = jira_server.search_issues('filter=25827') #, expand='changelog') issues_Jql = jira_server.search_issues('filter=25827') #, expand='changelog')
issues_Jql = jira_server.search_issues('key in (WRGWR-2932)') #, expand='changelog') #issues_Jql = jira_server.search_issues('key in (WRGWR-2932)') #, expand='changelog')
#issues_Jql = jira_server.search_issues('labels in (Refinement11012022) AND type not in (Bug) AND status not in (Done) and ("Story Points" is EMPTY or "Story Points" = 0)') #, expand='changelog') #issues_Jql = jira_server.search_issues('labels in (Refinement11012022) AND type not in (Bug) AND status not in (Done) and ("Story Points" is EMPTY or "Story Points" = 0)') #, expand='changelog')
logging.info(f'Creating sub-tasks out of estimation of pre-planning of {date.today()}') logging.info(f'Creating sub-tasks out of estimation of pre-planning of {date.today()}')