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

Xisco Fauli anistenis at gmail.com
Mon Jul 24 09:52:55 UTC 2017


 esc-reporting/qa-tools.py |   63 ++++++++++++++++++++++++++++++++--------------
 1 file changed, 44 insertions(+), 19 deletions(-)

New commits:
commit df6eea6afa6db32a48114741c6ce967dfa16538d
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Mon Jul 24 11:51:30 2017 +0200

    QA Tools: Fix check for bugs changed to a newer version

diff --git a/esc-reporting/qa-tools.py b/esc-reporting/qa-tools.py
index 9bd62ce..055d700 100755
--- a/esc-reporting/qa-tools.py
+++ b/esc-reporting/qa-tools.py
@@ -338,8 +338,9 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
                             confirmed = True
 
                     if change['field_name'] == 'version':
-                        if actionDate >= cfg[reportPeriod] and isOpen(rowStatus):
+                        if actionDate >= cfg[reportPeriod] and (isOpen(rowStatus) or rowStatus == 'UNCONFIRMED'):
                             addedVersion = change['added']
+                            removedVersion = change['removed']
                             if addedVersion == 'unspecified':
                                 addedVersion = 999999
                             elif addedVersion == 'Inherited From OOo':
@@ -347,6 +348,15 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
                             else:
                                 addedVersion = int(''.join([s for s in re.split('\.|\s',addedVersion) if s.isdigit()]).ljust(4, '0'))
 
+                            if removedVersion == 'unspecified':
+                                removedVersion = 999999
+                            elif removedVersion == 'Inherited From OOo':
+                                removedVersion = 0
+                            else:
+                                removedVersion = int(''.join([s for s in re.split('\.|\s',removedVersion) if s.isdigit()]).ljust(4, '0'))
+
+                            if removedVersion < oldestVersion:
+                                oldestVersion = removedVersion
 
                             if addedVersion <= oldestVersion:
                                 oldestVersion = addedVersion
@@ -562,7 +572,7 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
                     lResults['autoConfirmed'] = []
                 lResults['autoConfirmed'].append(rowId)
 
-            if newerVersion:
+            if newerVersion and row['version'] != 'unspecified':
                 if 'newerVersion' not in lResults:
                     lResults['newerVersion'] = []
                 lResults['newerVersion'].append(rowId)
commit 344f98c43162badba69bbd8a7f2207114bc6cbce
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Mon Jul 24 00:35:36 2017 +0200

    QA Tools: Groups reports by type

diff --git a/esc-reporting/qa-tools.py b/esc-reporting/qa-tools.py
index e4b42a0..9bd62ce 100755
--- a/esc-reporting/qa-tools.py
+++ b/esc-reporting/qa-tools.py
@@ -204,7 +204,8 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
 
     statList['addDate'] = datetime.date.today().strftime('%Y-%m-%d')
 
-    total = 0
+    lResults = {}
+    urlPath = "https://bugs.documentfoundation.org/show_bug.cgi?id="
     for key, row in bugzillaData['bugs'].items():
         #Ignore META bugs and deletionrequest bugs.
         if not row['summary'].lower().startswith('[meta]') and row['component'] != 'deletionrequest':
@@ -552,40 +553,54 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
                     util_check_bugzilla_mail(statList, email, person['real_name'])
 
             if movedToFixed:
-                total += 1
-                print(str(total) + " - MOVED TO FIXED: https://bugs.documentfoundation.org/show_bug.cgi?id=" + str(rowId))
+                if 'movedToFixed' not in lResults:
+                    lResults['movedToFixed'] = []
+                lResults['movedToFixed'].append(rowId)
 
             if autoConfirmed:
-                total += 1
-                print(str(total) + " - AUTO-CONFIRMED: https://bugs.documentfoundation.org/show_bug.cgi?id=" + str(rowId))
+                if 'autoConfirmed' not in lResults:
+                    lResults['autoConfirmed'] = []
+                lResults['autoConfirmed'].append(rowId)
 
             if newerVersion:
-                total += 1
-                print(str(total) + " - VERSION CHANGED TO A NEWER ONE: https://bugs.documentfoundation.org/show_bug.cgi?id=" + str(rowId))
+                if 'newerVersion' not in lResults:
+                    lResults['newerVersion'] = []
+                lResults['newerVersion'].append(rowId)
 
             if crashSignature and not crashSignature.startswith('["'):
-                total += 1
-                print(str(total) + " - INCORRECT CRASHREPORT SYNTAX: https://bugs.documentfoundation.org/show_bug.cgi?id=" + str(rowId))
+                if 'crashSignature' not in lResults:
+                    lResults['crashSignature'] = []
+                lResults['crashSignature'].append(rowId)
 
             #In case the reporter assigned the bug to himself at creation time
             if addAssigned or (creationDate >= cfg[reportPeriod] and row['assigned_to'] != 'libreoffice-bugs at lists.freedesktop.org' and \
                     ( rowStatus == 'NEW' or rowStatus == 'UNCONFIRMED' or rowStatus == 'REOPENED')):
-                total += 1
-                print(str(total) + " - ADD ASSIGNED: https://bugs.documentfoundation.org/show_bug.cgi?id=" + str(rowId))
+                if 'addAssigned' not in lResults:
+                    lResults['addAssigned'] = []
+                lResults['addAssigned'].append(rowId)
 
             if removeAssigned:
-                total += 1
-                print(str(total) + " - REMOVE ASSIGNED: https://bugs.documentfoundation.org/show_bug.cgi?id=" + str(rowId))
+                if 'removeAssigned' not in lResults:
+                    lResults['removeAssigned'] = []
+                lResults['removeAssigned'].append(rowId)
 
             if backPortAdded:
-                total += 1
-                print(str(total) + " - BACKPORT ADDED: https://bugs.documentfoundation.org/show_bug.cgi?id=" + str(rowId))
+                if 'backPortAdded' not in lResults:
+                    lResults['backPortAdded'] = []
+                lResults['backPortAdded'].append(rowId)
 
             if isOpen(rowStatus) and commentMail == 'libreoffice-commits at lists.freedesktop.org' and \
                     commentDate < cfg[lastAction] and commentDate >= cfg['diffAction'] and \
                     'easyHack' not in row['keywords']:
-                total += 1
-                print(str(total) + " - FIX BUG PING: https://bugs.documentfoundation.org/show_bug.cgi?id=" + str(rowId))
+                if 'fixBugPing' not in lResults:
+                    lResults['fixBugPing'] = []
+                lResults['fixBugPing'].append(rowId)
+
+    for dKey, dValue in lResults.items():
+        if dValue:
+            print('\n=== ' + dKey + ' ===')
+            for idx, val in enumerate(dValue):
+                print(str(idx + 1) + ' - ' + urlPath + str(val))
 
     for k, v in statList['people'].items():
         if not statList['people'][k]['name']:


More information about the Libreoffice-commits mailing list