diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-12-07 15:10:16 +0100 |
---|---|---|
committer | Xisco Fauli <anistenis@gmail.com> | 2016-12-07 15:10:16 +0100 |
commit | 8b14690e3251b8bc02a4754c2b37112acaca7e83 (patch) | |
tree | 84b82608c1ce9fa686a5f7f2a9df4e2e21385439 | |
parent | c624eefa1d2a831c0596df3341093e048a476763 (diff) |
bug owner should be based on creation time, not in last change
-rwxr-xr-x | esc-reporting/esc-analyze.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index f6d7cf7..7e68938 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -82,10 +82,10 @@ def util_dump_file(fileName, rawList): def util_build_period_stat(cfg, statList, xDate, email, status, pstatus, base = 'gerrit'): for i in '1year', '3month', '1month', '1week': if xDate > cfg[i + 'Date']: - if not email is None: + if email is not None: statList['people'][email][base][i][pstatus] += 1 statList['people'][email][base][i]['total'] += 1 - if not base == 'gerrit' : + if base != 'gerrit' : statList['data'][base][i][status] += 1 statList['data'][base][i]['total'] += 1 elif statList['people'][email]['isCommitter']: @@ -384,10 +384,11 @@ def analyze_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): for key, row in bugzillaData['bugs'].items(): email = util_check_mail('*UNKNOWN*', row['creator'], statList, cfg['contributor']['combine-email']) xDate = datetime.datetime.strptime(row['last_change_time'], "%Y-%m-%dT%H:%M:%SZ") + creationDate = datetime.datetime.strptime(row['creation_time'], "%Y-%m-%dT%H:%M:%SZ") if xDate > cfg['cutDate']: continue - util_build_period_stat(cfg, statList, xDate, email, row['status'], 'owner', base='qa') + util_build_period_stat(cfg, statList, creationDate, email, row['status'], 'owner', base='qa') for change in row['comments']: email = util_check_mail('*UNKNOWN*', change['creator'], statList, cfg['contributor']['combine-email']) |