forked from RazTamir/bugzilla-reports-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomponent_distribution.py
More file actions
21 lines (17 loc) · 823 Bytes
/
component_distribution.py
File metadata and controls
21 lines (17 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python
from helpers import *
g = gapi.GoogleSpreadSheetAPI(SPREADSHEET_NAME, "component_distribution")
all_bugs = get_overall_backlog(version=BUGZILLA_VERSION_FLAG)
component_dict = filter_by_component(all_bugs)
for idx, comp in enumerate(component_dict):
urgent_bugs = len(filter_by_severity(component_dict[comp], 'urgent'))
high_bugs = len(filter_by_severity(component_dict[comp], 'high'))
medium_bugs = len(filter_by_severity(component_dict[comp], 'medium'))
low_bugs = len(filter_by_severity(component_dict[comp], 'low'))
row = 2 + idx
column = 1
g.update_sheet(row, column, comp)
g.update_sheet(row, column + 1, urgent_bugs)
g.update_sheet(row, column + 2, high_bugs)
g.update_sheet(row, column + 3, medium_bugs)
g.update_sheet(row, column + 4, low_bugs)