[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py

Xisco Fauli anistenis at gmail.com
Wed Dec 7 14:14:53 UTC 2016


 esc-reporting/esc-analyze.py |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 8b14690e3251b8bc02a4754c2b37112acaca7e83
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Wed Dec 7 15:10:16 2016 +0100

    bug owner should be based on creation time, not in last change

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'])


More information about the Libreoffice-commits mailing list