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

Xisco Fauli anistenis at gmail.com
Sun Sep 24 20:02:20 UTC 2017


 esc-reporting/qa-tools.py |   45 +++++++++++++++++++++++++++++++++++----------
 1 file changed, 35 insertions(+), 10 deletions(-)

New commits:
commit 76088f5be81ca2bf28c277638ffbc516020064c1
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Sun Sep 24 22:00:29 2017 +0200

    QA tools: Warn about reopened bugs fixed for more than 6 months

diff --git a/esc-reporting/qa-tools.py b/esc-reporting/qa-tools.py
index 6ac2b1b..c91c91f 100755
--- a/esc-reporting/qa-tools.py
+++ b/esc-reporting/qa-tools.py
@@ -364,6 +364,9 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
             bResolved = False
             lastAssignedEmail = ""
             patchAdded = False
+            isReopened = False
+            closeDate = None
+            reopenerEmail = ""
             for action in row['history']:
                 actionMail = action['who']
                 actionDate = datetime.datetime.strptime(action['when'], "%Y-%m-%dT%H:%M:%SZ")
@@ -448,6 +451,7 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
                         if rowStatus == 'ASSIGNED' and addedStatus == 'ASSIGNED':
                             lastAssignedEmail = actionMail
 
+
                         if actionDate >= cfg[reportPeriod] and not bResolved and isClosed(addedStatus) and isClosed(row['status']):
                             bResolved = True
                             week = str(actionDate.year) + '-' + str(actionDate.strftime("%V"))
@@ -522,16 +526,24 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
                                 removeAssigned = True
                                 removeAssignedMail = actionMail
 
-                    elif newStatus and change['field_name'] == 'resolution':
-                        addedStatus = newStatus + "_" + change['added']
-                        util_increase_user_actions(statList, key, actionMail, bugTargets, 'status_changed', actionDate)
+                    elif change['field_name'] == 'resolution':
+                        if newStatus:
+                            addedStatus = newStatus + "_" + change['added']
+                            util_increase_user_actions(statList, key, actionMail, bugTargets, 'status_changed', actionDate)
+
+                            if actionDate >= cfg[reportPeriod] and rowStatus == addedStatus:
+                                statList['detailedReport']['status_changed_to'][addedStatus] += 1
+                                statList['detailedReport']['lists']['status_changed_to'][addedStatus][0].append(key)
+                                statList['detailedReport']['lists']['status_changed_to'][addedStatus][1].append(actionMail)
 
-                        if actionDate >= cfg[reportPeriod] and rowStatus == addedStatus:
-                            statList['detailedReport']['status_changed_to'][addedStatus] += 1
-                            statList['detailedReport']['lists']['status_changed_to'][addedStatus][0].append(key)
-                            statList['detailedReport']['lists']['status_changed_to'][addedStatus][1].append(actionMail)
+                            newStatus = None
 
-                        newStatus = None
+                        if change['added'] == 'FIXED' and isOpen(rowStatus):
+                            closeDate = actionDate
+                        elif change['removed'] == 'FIXED' and closeDate and actionDate >= cfg[reportPeriod] and \
+                                (actionDate - closeDate).days > 180:
+                            isReopened = True
+                            reopenerEmail = actionMail
 
                     elif change['field_name'] == 'priority':
                         newPriority = change['added']
@@ -708,6 +720,12 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
                 lResults['crashSignature'][0].append(rowId)
                 lResults['crashSignature'][1].append('')
 
+            if isReopened:
+                if 'reopened6Months' not in lResults:
+                    lResults['reopened6Months'] = [[],[]]
+                lResults['reopened6Months'][0].append(rowId)
+                lResults['reopened6Months'][1].append(reopenerEmail)
+
             #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')):
commit 8a2da47911850e75480828f6bb80a8d4b719dfd5
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Sun Sep 24 16:14:22 2017 +0200

    QA tools: Warn about keyword patch added

diff --git a/esc-reporting/qa-tools.py b/esc-reporting/qa-tools.py
index fa301f7..6ac2b1b 100755
--- a/esc-reporting/qa-tools.py
+++ b/esc-reporting/qa-tools.py
@@ -363,6 +363,7 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
             backPortAddedMail = ""
             bResolved = False
             lastAssignedEmail = ""
+            patchAdded = False
             for action in row['history']:
                 actionMail = action['who']
                 actionDate = datetime.datetime.strptime(action['when'], "%Y-%m-%dT%H:%M:%SZ")
@@ -572,8 +573,8 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
                                         if rowStatus not in statList['detailedReport']['bisectedStatus']:
                                             statList['detailedReport']['bisectedStatus'][rowStatus] = 0
                                         statList['detailedReport']['bisectedStatus'][rowStatus] += 1
-
-
+                                    elif keyword == 'patch':
+                                        patchAdded = True
 
                         keywordsRemoved = change['removed'].split(", ")
                         for keyword in keywordsRemoved:
@@ -695,6 +696,12 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
                 lResults['newerVersion'][0].append(rowId)
                 lResults['newerVersion'][1].append(newerVersionMail)
 
+            if (isOpen(rowStatus) or rowStatus == 'UNCONFIRMED') and patchAdded:
+                if 'patchAdded' not in lResults:
+                    lResults['patchAdded'] = [[],[]]
+                lResults['patchAdded'][0].append(rowId)
+                lResults['patchAdded'][1].append('')
+
             if crashSignature and not crashSignature.startswith('["'):
                 if 'crashSignature' not in lResults:
                     lResults['crashSignature'] = [[],[]]


More information about the Libreoffice-commits mailing list