forked from RazTamir/bugzilla-reports-tool
-
Notifications
You must be signed in to change notification settings - Fork 2
/
arrivals_vs_resolved_weekly.py
27 lines (25 loc) · 1017 Bytes
/
arrivals_vs_resolved_weekly.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python
from helpers import *
from datetime import datetime, timedelta
CONST = 0
yesterday = datetime.today() - timedelta(days=7*CONST) - timedelta(days=1)
week_time_frame = datetime.today() - timedelta(days=7*CONST) - timedelta(days=7)
g = gapi.GoogleSpreadSheetAPI(SPREADSHEET_NAME, "weekly_arrivals_vs_resolved_data")
new_bugs = get_new_arrivals(
changed_from=week_time_frame.strftime("%Y-%m-%d"), changed_to=yesterday.strftime("%Y-%m-%d")
)
resolved_bugs = get_resolved_bugs(
changed_from=week_time_frame.strftime("%Y-%m-%d"), changed_to=yesterday.strftime("%Y-%m-%d")
)
verified_bugs = get_verified_bugs(
changed_from=week_time_frame.strftime("%Y-%m-%d"), changed_to=yesterday.strftime("%Y-%m-%d")
)
blocker_bugs = get_blocker_arrivals(
changed_from=week_time_frame.strftime("%Y-%m-%d"), changed_to=yesterday.strftime("%Y-%m-%d")
)
g.insert_row(
[
yesterday.strftime("%m-%d"), len(new_bugs), len(resolved_bugs),
len(verified_bugs), len(blocker_bugs)
]
)