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

Xisco Fauli anistenis at gmail.com
Fri Oct 27 12:09:41 UTC 2017


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

New commits:
commit 467f948fccd4fce3a103606b2e7f89ec85272d32
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Fri Oct 27 14:06:21 2017 +0200

    QA tools: Create wiki table for bugs with 3 or more dupes

diff --git a/esc-reporting/qa-tools.py b/esc-reporting/qa-tools.py
index 7789b8a..f6b4b5f 100755
--- a/esc-reporting/qa-tools.py
+++ b/esc-reporting/qa-tools.py
@@ -191,6 +191,7 @@ def util_create_statList():
         'period': {p:{'count':0, 'people':{}} for p in periods_list},
         'MostCCBugs': {},
         'dupesBugs': {},
+        'MostDupeBugs': {},
         'stat': {'oldest': datetime.datetime.now(), 'newest': datetime.datetime(2001, 1, 1)}
     }
 
@@ -348,6 +349,19 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
                     statList['dupesBugs'][rowDupeOf] = []
                 statList['dupesBugs'][rowDupeOf].append(rowId)
 
+                if str(rowDupeOf) in bugzillaData['bugs'] and \
+                        isOpen(bugzillaData['bugs'][str(rowDupeOf)]['status']):
+                    if rowDupeOf not in statList['MostDupeBugs']:
+                        statList['MostDupeBugs'][rowDupeOf] = util_create_bug(
+                        bugzillaData['bugs'][str(rowDupeOf)]['summary'],
+                        bugzillaData['bugs'][str(rowDupeOf)]['component'],
+                        bugzillaData['bugs'][str(rowDupeOf)]['version'],
+                        bugzillaData['bugs'][str(rowDupeOf)]['keywords'],
+                        datetime.datetime.strptime(
+                            bugzillaData['bugs'][str(rowDupeOf)]['creation_time'], "%Y-%m-%dT%H:%M:%SZ"),
+                        1)
+
+
             actionMail = None
             fixed = False
             everConfirmed = False
@@ -794,6 +808,11 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
 
     output = ''
     for k, v in statList['dupesBugs'].items():
+        if k in statList['MostDupeBugs']:
+            if len(v) >= 3:
+                statList['MostDupeBugs'][k]['count'] = len(v)
+            else:
+                del statList['MostDupeBugs'][k]
         for dupeBug in v:
             if dupeBug in statList['dupesBugs']:
                 output += '\n- Duplicates of ' + str(k)
@@ -924,7 +943,7 @@ def util_print_QA_line_created(fp, dValue ):
         print('      {}: {}'.format(k, v), file=fp)
 
 def create_wikimedia_table_mostCCBugs(cfg, statList):
-    for nameList in ['MostCCBugs']:
+    for nameList in ['MostCCBugs', 'MostDupeBugs']:
         print('Creating wikimedia table for ' + nameList)
         output = ""
 
@@ -943,8 +962,8 @@ def create_wikimedia_table_mostCCBugs(cfg, statList):
             headers = ['Id', 'Summary', 'Component', 'Version', 'isRegression', 'isBisected',
                            'isEasyHack', 'haveBackTrace', 'Total Duplicates']
 
-            output += '{} bugs have 10 or more duplicates. (sorted in alphabetical order by number of duplicates)\n'.format(
-                    len(statList['MostDuplicatedBugs']))
+            output += '{} open bugs have 3 or more duplicates. (sorted in alphabetical order by number of duplicates)\n'.format(
+                    len(statList['MostDupeBugs']))
 
         for k,v in statList[nameList].items():
             row = []
commit 00101c8e80cae57520dc2cfd44c1eeda5c015c6f
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Fri Oct 27 13:25:07 2017 +0200

    QA tools: find duplicate of duplicates

diff --git a/esc-reporting/qa-tools.py b/esc-reporting/qa-tools.py
index e93edad..7789b8a 100755
--- a/esc-reporting/qa-tools.py
+++ b/esc-reporting/qa-tools.py
@@ -190,6 +190,7 @@ def util_create_statList():
         'targets': {t:{'count':0, 'people':{}} for t in targets_list},
         'period': {p:{'count':0, 'people':{}} for p in periods_list},
         'MostCCBugs': {},
+        'dupesBugs': {},
         'stat': {'oldest': datetime.datetime.now(), 'newest': datetime.datetime(2001, 1, 1)}
     }
 
@@ -341,6 +342,12 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
                         row['summary'], row['component'], row['version'], keywords, creationDate, len(row['cc']))
 
 
+            rowDupeOf = row['dupe_of']
+            if rowDupeOf:
+                if rowDupeOf not in statList['dupesBugs']:
+                    statList['dupesBugs'][rowDupeOf] = []
+                statList['dupesBugs'][rowDupeOf].append(rowId)
+
             actionMail = None
             fixed = False
             everConfirmed = False
@@ -785,6 +792,17 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
                 lResults['emptyAlias'][0].append(rowId)
                 lResults['emptyAlias'][1].append('')
 
+    output = ''
+    for k, v in statList['dupesBugs'].items():
+        for dupeBug in v:
+            if dupeBug in statList['dupesBugs']:
+                output += '\n- Duplicates of ' + str(k)
+                for subDupeBug in statList['dupesBugs'][dupeBug]:
+                    output += '\n    * ' + urlShowBug + str(subDupeBug)
+    if output:
+        output = '=== DupeOfDupe ===' + output
+        print(output)
+
     for dKey, dValue in lResults.items():
         if dValue:
             print('\n=== ' + dKey + ' ===')


More information about the Libreoffice-commits mailing list