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

Xisco Fauli anistenis at gmail.com
Thu Jun 8 10:04:23 UTC 2017


 esc-reporting/qa-tools.py |   56 ++++++++++++++++++++++++++++++++--------------
 1 file changed, 40 insertions(+), 16 deletions(-)

New commits:
commit 50e2736d5e271e006705ea5f341110c908024ea3
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Thu Jun 8 11:57:27 2017 +0200

    QA tools: warm about autoconfirmed bugs and bugs moved...
    
    ...from NEEDINFO to NEW/REOPENED/ASSIGNED

diff --git a/esc-reporting/qa-tools.py b/esc-reporting/qa-tools.py
index 116edfe..912a158 100755
--- a/esc-reporting/qa-tools.py
+++ b/esc-reporting/qa-tools.py
@@ -194,7 +194,7 @@ def util_increase_user_actions(statList, bug, mail, targets, action, actionTime)
             statList['period'][period]['people'][mail]['bugs'].append(bug)
 
 def analyze_bugzilla(statList, bugzillaData, cfg):
-    print("Analyze bugzilla", end="", flush=True)
+    print("Analyze bugzilla\n", end="", flush=True)
     statNewDate = statList['stat']['newest']
     statOldDate = statList['stat']['oldest']
 
@@ -202,7 +202,7 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
 
     for key, row in bugzillaData['bugs'].items():
 	    #Ignore META bugs and deletionrequest bugs.
-        if not row['summary'].startswith('[META]') and row['component'] != 'deletionrequest':
+        if not row['summary'].lower().startswith('[meta]') and row['component'] != 'deletionrequest':
             creationDate = datetime.datetime.strptime(row['creation_time'], "%Y-%m-%dT%H:%M:%SZ")
             if creationDate < statOldDate:
                 statOldDate = creationDate
@@ -293,6 +293,8 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
             actionMail = None
             confirmed = False
             fixed = False
+            autoConfirmed = False
+            movedFromNeedInfo = False
             for action in row['history']:
                 actionMail = action['who']
                 actionDate = datetime.datetime.strptime(action['when'], "%Y-%m-%dT%H:%M:%SZ")
@@ -316,6 +318,7 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
                     if change['field_name'] == 'status':
 
                         addedStatus = change['added']
+                        removedStatus = change['removed']
                         if  addedStatus == 'RESOLVED' or addedStatus == 'VERIFIED':
                             if(rowResolution):
                                 addedStatus = addedStatus + "_" + rowResolution
@@ -349,6 +352,24 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
                             statList['detailedReport']['is_fixed'] += 1
                             fixed = True
 
+                        #Auto-confirmed bug has been changed later on
+                        if autoConfirmed and isOpen(rowStatus) \
+                            and isOpen(addedStatus) and (removedStatus == 'UNCONFIRMED' or removedStatus == 'REOPENED'):
+                                autoConfirmed = False
+
+                        #NEEDINFO bug has been moved to UNCONFIRMED later on
+                        if movedFromNeedInfo and isOpen(rowStatus) \
+                            and addedStatus == 'UNCONFIRMED':
+                                movedFromNeedInfo = False
+
+                        #Check for auto-confirmed bugs and bugs moved from NEEDINFO to something else than UNCONFIRMED
+                        #Ignore bisected bugs
+                        if creationDate >= cfg[reportPeriod] and actionMail == creatorMail and isOpen(rowStatus) \
+                            and isOpen(addedStatus) and 'bisected' not in keywords:
+                            if removedStatus == 'UNCONFIRMED':
+                                autoConfirmed = True
+                            elif removedStatus == 'NEEDINFO':
+                                movedFromNeedInfo = True
 
                     elif newStatus and change['field_name'] == 'resolution':
                         addedStatus = newStatus + "_" + change['added']
@@ -468,6 +489,11 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
                 if commentMail == email or actionMail == email:
                     util_check_bugzilla_mail(statList, email, person['real_name'])
 
+            if autoConfirmed:
+                print("AUTO-CONFIRMED: https://bugs.documentfoundation.org/show_bug.cgi?id=" + str(row['id']))
+            elif movedFromNeedInfo:
+                print("MOVED FROM NEEDINFO: https://bugs.documentfoundation.org/show_bug.cgi?id=" + str(row['id']))
+
     for k, v in statList['people'].items():
         if not statList['people'][k]['name']:
             statList['people'][k]['name'] = statList['people'][k]['email'].split('@')[0]
commit 9d91574a72bf4a4d67d40c239e518c2ee04f8a1d
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Mon Jun 5 11:31:43 2017 +0200

    Remove duplicated variable

diff --git a/esc-reporting/qa-tools.py b/esc-reporting/qa-tools.py
index ff33cd5..116edfe 100755
--- a/esc-reporting/qa-tools.py
+++ b/esc-reporting/qa-tools.py
@@ -243,10 +243,9 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
                     statList['detailedReport']['bug_component'][component] = 0
                 statList['detailedReport']['bug_component'][component] += 1
 
-                status = row['status']
-                if status not in statList['detailedReport']['bug_status']:
-                    statList['detailedReport']['bug_status'][status] = 0
-                statList['detailedReport']['bug_status'][status] += 1
+                if rowStatus not in statList['detailedReport']['bug_status']:
+                    statList['detailedReport']['bug_status'][rowStatus] = 0
+                statList['detailedReport']['bug_status'][rowStatus] += 1
 
                 resolution = row['resolution']
                 if resolution not in statList['detailedReport']['bug_resolution']:
@@ -391,18 +390,17 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
                                     statList['detailedReport']['lists']['keyword_added'][keyword][1].append(actionMail)
 
                                     if keyword == 'haveBacktrace':
-                                        if status not in statList['detailedReport']['backTraceStatus']:
-                                            statList['detailedReport']['backTraceStatus'][status] = 0
-                                        statList['detailedReport']['backTraceStatus'][status] += 1
+                                        if rowStatus not in statList['detailedReport']['backTraceStatus']:
+                                            statList['detailedReport']['backTraceStatus'][rowStatus] = 0
+                                        statList['detailedReport']['backTraceStatus'][rowStatus] += 1
                                     elif keyword == 'regression':
-                                        if status not in statList['detailedReport']['regressionStatus']:
-                                            statList['detailedReport']['regressionStatus'][status] = 0
-                                        statList['detailedReport']['regressionStatus'][status] += 1
+                                        if rowStatus not in statList['detailedReport']['regressionStatus']:
+                                            statList['detailedReport']['regressionStatus'][rowStatus] = 0
+                                        statList['detailedReport']['regressionStatus'][rowStatus] += 1
                                     elif keyword == 'bisected':
-                                        if status not in statList['detailedReport']['bisectedStatus']:
-                                            statList['detailedReport']['bisectedStatus'][status] = 0
-                                        statList['detailedReport']['bisectedStatus'][status] += 1
-
+                                        if rowStatus not in statList['detailedReport']['bisectedStatus']:
+                                            statList['detailedReport']['bisectedStatus'][rowStatus] = 0
+                                        statList['detailedReport']['bisectedStatus'][rowStatus] += 1
 
 
 


More information about the Libreoffice-commits mailing list