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

Xisco Fauli anistenis at gmail.com
Mon Jun 12 11:47:00 UTC 2017


 esc-reporting/qa-tools.py |   31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

New commits:
commit 1d33f87d637da019d590c93e1af28fcf5a4f66b8
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Mon Jun 12 13:46:05 2017 +0200

    QA tools: Warn about bugs changed to a newer version

diff --git a/esc-reporting/qa-tools.py b/esc-reporting/qa-tools.py
index 912a158..505a732 100755
--- a/esc-reporting/qa-tools.py
+++ b/esc-reporting/qa-tools.py
@@ -12,6 +12,7 @@ import os
 import datetime
 import json
 from pyshorteners import Shortener
+import re
 
 homeDir = '/home/xisco/dev-tools/esc-reporting/'
 
@@ -200,6 +201,7 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
 
     statList['addDate'] = datetime.date.today().strftime('%Y-%m-%d')
 
+    total = 0
     for key, row in bugzillaData['bugs'].items():
 	    #Ignore META bugs and deletionrequest bugs.
         if not row['summary'].lower().startswith('[meta]') and row['component'] != 'deletionrequest':
@@ -294,7 +296,10 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
             confirmed = False
             fixed = False
             autoConfirmed = False
+            versionChanged = False
             movedFromNeedInfo = False
+            oldestVersion = 999999
+            newerVersion = False
             for action in row['history']:
                 actionMail = action['who']
                 actionDate = datetime.datetime.strptime(action['when'], "%Y-%m-%dT%H:%M:%SZ")
@@ -315,6 +320,23 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
                             statList['detailedReport']['lists']['confirm'][1].append(actionMail)
                             confirmed = True
 
+                    if change['field_name'] == 'version':
+                        if creationDate >= cfg[reportPeriod] and isOpen(rowStatus):
+                            addedVersion = change['added']
+                            if addedVersion == 'unspecified':
+                                addedVersion = 999999
+                            elif addedVersion == 'Inherited From OOo':
+                                addedVersion = 0
+                            else:
+                                addedVersion = int(''.join([s for s in re.split('\.|\s',addedVersion) if s.isdigit()]).ljust(4, '0'))
+
+
+                            if addedVersion <= oldestVersion:
+                                oldestVersion = addedVersion
+                                newerVersion = False
+                            else:
+                                newerVersion = True
+
                     if change['field_name'] == 'status':
 
                         addedStatus = change['added']
@@ -490,9 +512,14 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
                     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']))
+                total += 1
+                print(str(total) + " - 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']))
+                total += 1
+                print(str(total) + " - MOVED FROM NEEDINFO: https://bugs.documentfoundation.org/show_bug.cgi?id=" + str(row['id']))
+            elif newerVersion:
+                total += 1
+                print(str(total) + " - VERSION CHANGED TO A NEWER ONE: https://bugs.documentfoundation.org/show_bug.cgi?id=" + str(row['id']))
 
     for k, v in statList['people'].items():
         if not statList['people'][k]['name']:


More information about the Libreoffice-commits mailing list