summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-12-07 15:10:16 +0100
committerXisco Fauli <anistenis@gmail.com>2016-12-07 15:10:16 +0100
commit8b14690e3251b8bc02a4754c2b37112acaca7e83 (patch)
tree84b82608c1ce9fa686a5f7f2a9df4e2e21385439
parentc624eefa1d2a831c0596df3341093e048a476763 (diff)
bug owner should be based on creation time, not in last change
-rwxr-xr-xesc-reporting/esc-analyze.py7
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'])