[Libreoffice-commits] dev-tools.git: 3 commits - qa/createBlogReport.py

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 3 20:11:00 UTC 2019


 qa/createBlogReport.py |  142 ++++++++++++++++++++++++++++++++-----------------
 1 file changed, 95 insertions(+), 47 deletions(-)

New commits:
commit c7f781d9af75ac1b419f0da4b8147079512b3f92
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Jan 3 16:41:44 2019 +0100
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Jan 3 21:10:38 2019 +0100

    QA: Add High Priority bugs

diff --git a/qa/createBlogReport.py b/qa/createBlogReport.py
index 5157bbe..32aee74 100755
--- a/qa/createBlogReport.py
+++ b/qa/createBlogReport.py
@@ -38,6 +38,7 @@ def util_create_statList():
         'unconfirmedCount' : {},
         'regressionCount' : {},
         'highestCount' : {},
+        'highCount' : {},
         'stat': {'oldest': datetime.now(), 'newest': datetime(2001, 1, 1)}
     }
 
@@ -79,6 +80,7 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg):
     unconfirmedCountPerDay = {}
     regressionsCountPerDay = {}
     highestCountPerDay = {}
+    highCountPerDay = {}
     fixedBugs = []
     for key, row in bugzillaData['bugs'].items():
         rowId = row['id']
@@ -122,6 +124,8 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg):
             isRegressionClosed = False
             isHighest = False
             isHighestClosed = False
+            isHigh = False
+            isHighClosed = False
 
             for action in row['history']:
                 actionMail = action['who']
@@ -153,6 +157,21 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg):
                                     highestCountPerDay[strDay] -= 1
                                     isHighest = False
 
+                            if not isHighClosed:
+                                if not isHigh and addedPriority == "high":
+                                    strDay = actionDate.strftime("%Y-%m-%d")
+                                    if strDay not in highCountPerDay:
+                                        highCountPerDay[strDay] = 0
+                                    highCountPerDay[strDay] += 1
+                                    isHigh = True
+
+                                if isHigh and removedPriority == "high":
+                                    strDay = actionDate.strftime("%Y-%m-%d")
+                                    if strDay not in highCountPerDay:
+                                        highCountPerDay[strDay] = 0
+                                    highCountPerDay[strDay] -= 1
+                                    isHigh = False
+
                         if change['field_name'] == 'status':
                             addedStatus = change['added']
                             removedStatus = change['removed']
@@ -189,7 +208,7 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg):
                                     isRegressionClosed = True
 
                             if isHighest:
-                                # the Highest is being reopened
+                                # the Highest priority bug is being reopened
                                 if isHighestClosed and common.isOpen(addedStatus):
                                     strDay = actionDate.strftime("%Y-%m-%d")
                                     if strDay not in highestCountPerDay:
@@ -197,7 +216,7 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg):
                                     highestCountPerDay[strDay] += 1
                                     isHighestClosed = False
 
-                                # the Highest is being closed
+                                # the Highest priority bug is being closed
                                 if not isHighestClosed and common.isClosed(addedStatus):
                                     strDay = actionDate.strftime("%Y-%m-%d")
                                     if strDay not in highestCountPerDay:
@@ -205,6 +224,23 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg):
                                     highestCountPerDay[strDay] -= 1
                                     isHighestClosed = True
 
+                            if isHigh:
+                                # the High priority bug is being reopened
+                                if isHighClosed and common.isOpen(addedStatus):
+                                    strDay = actionDate.strftime("%Y-%m-%d")
+                                    if strDay not in highCountPerDay:
+                                        highCountPerDay[strDay] = 0
+                                    highCountPerDay[strDay] += 1
+                                    isHighClosed = False
+
+                                # the High priority bug is being closed
+                                if not isHighClosed and common.isClosed(addedStatus):
+                                    strDay = actionDate.strftime("%Y-%m-%d")
+                                    if strDay not in highCountPerDay:
+                                        highCountPerDay[strDay] = 0
+                                    highCountPerDay[strDay] -= 1
+                                    isHighClosed = True
+
                             if check_date(actionDate, cfg):
                                 if removedStatus == "UNCONFIRMED":
                                     util_increase_action(statList['confirmed'], rowId, actionMail, actionDay, diffTime)
@@ -343,6 +379,14 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg):
 
         statList['highestCount'][single_day] = totalCount3
 
+        totalCount4 = 0
+        for k, v in highCountPerDay.items():
+            xDay = datetime.strptime( k, "%Y-%m-%d")
+            if xDay < single_date:
+                totalCount4 += v
+
+        statList['highCount'][single_day] = totalCount4
+
 def makeStrong(text):
     return "<strong>" + str(text) + "</strong>"
 
@@ -452,6 +496,9 @@ def createReport(statList):
     createEvolutionSection(
         fp, statList['highestCount'], "Highest Priority Bugs",
         "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&priority=highest&query_format=advanced&resolution=---", "sandybrown")
+    createEvolutionSection(
+        fp, statList['highCount'], "High Priority Bugs",
+        "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&priority=high&query_format=advanced&resolution=---", "indianred")
 
     print(makeStrong('Thank you all for making Libreoffice rock!'), file=fp)
     print(makeStrong('Join us and help to keep LibreOffice super reliable!'), file=fp)
commit 0748e49ee3c7466524e517361151e475017c8eb7
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Jan 3 12:57:07 2019 +0100
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Jan 3 21:10:38 2019 +0100

    QA: Most Pressing Bugs -> Highest Priority Bugs

diff --git a/qa/createBlogReport.py b/qa/createBlogReport.py
index 83e14bb..5157bbe 100755
--- a/qa/createBlogReport.py
+++ b/qa/createBlogReport.py
@@ -37,7 +37,7 @@ def util_create_statList():
         'people' : {},
         'unconfirmedCount' : {},
         'regressionCount' : {},
-        'MPBCount' : {},
+        'highestCount' : {},
         'stat': {'oldest': datetime.now(), 'newest': datetime(2001, 1, 1)}
     }
 
@@ -78,7 +78,7 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg):
 
     unconfirmedCountPerDay = {}
     regressionsCountPerDay = {}
-    MPBCountPerDay = {}
+    highestCountPerDay = {}
     fixedBugs = []
     for key, row in bugzillaData['bugs'].items():
         rowId = row['id']
@@ -120,8 +120,8 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg):
             authorVerified = None
             isRegression = False
             isRegressionClosed = False
-            isMPB = False
-            isMPBClosed = False
+            isHighest = False
+            isHighestClosed = False
 
             for action in row['history']:
                 actionMail = action['who']
@@ -138,20 +138,20 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg):
                             addedPriority = change['added']
                             removedPriority = change['removed']
 
-                            if not isMPBClosed:
-                                if not isMPB and addedPriority == "highest":
+                            if not isHighestClosed:
+                                if not isHighest and addedPriority == "highest":
                                     strDay = actionDate.strftime("%Y-%m-%d")
-                                    if strDay not in MPBCountPerDay:
-                                        MPBCountPerDay[strDay] = 0
-                                    MPBCountPerDay[strDay] += 1
-                                    isMPB = True
+                                    if strDay not in highestCountPerDay:
+                                        highestCountPerDay[strDay] = 0
+                                    highestCountPerDay[strDay] += 1
+                                    isHighest = True
 
-                                if isMPB and removedPriority == "highest":
+                                if isHighest and removedPriority == "highest":
                                     strDay = actionDate.strftime("%Y-%m-%d")
-                                    if strDay not in MPBCountPerDay:
-                                        MPBCountPerDay[strDay] = 0
-                                    MPBCountPerDay[strDay] -= 1
-                                    isMPB = False
+                                    if strDay not in highestCountPerDay:
+                                        highestCountPerDay[strDay] = 0
+                                    highestCountPerDay[strDay] -= 1
+                                    isHighest = False
 
                         if change['field_name'] == 'status':
                             addedStatus = change['added']
@@ -188,22 +188,22 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg):
                                     regressionsCountPerDay[strDay] -= 1
                                     isRegressionClosed = True
 
-                            if isMPB:
-                                # the MPB is being reopened
-                                if isMPBClosed and common.isOpen(addedStatus):
+                            if isHighest:
+                                # the Highest is being reopened
+                                if isHighestClosed and common.isOpen(addedStatus):
                                     strDay = actionDate.strftime("%Y-%m-%d")
-                                    if strDay not in MPBCountPerDay:
-                                        MPBCountPerDay[strDay] = 0
-                                    MPBCountPerDay[strDay] += 1
-                                    isMPBClosed = False
+                                    if strDay not in highestCountPerDay:
+                                        highestCountPerDay[strDay] = 0
+                                    highestCountPerDay[strDay] += 1
+                                    isHighestClosed = False
 
-                                # the MPB is being closed
-                                if not isMPBClosed and common.isClosed(addedStatus):
+                                # the Highest is being closed
+                                if not isHighestClosed and common.isClosed(addedStatus):
                                     strDay = actionDate.strftime("%Y-%m-%d")
-                                    if strDay not in MPBCountPerDay:
-                                        MPBCountPerDay[strDay] = 0
-                                    MPBCountPerDay[strDay] -= 1
-                                    isMPBClosed = True
+                                    if strDay not in highestCountPerDay:
+                                        highestCountPerDay[strDay] = 0
+                                    highestCountPerDay[strDay] -= 1
+                                    isHighestClosed = True
 
                             if check_date(actionDate, cfg):
                                 if removedStatus == "UNCONFIRMED":
@@ -336,12 +336,12 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg):
         statList['regressionCount'][single_day] = totalCount2
 
         totalCount3 = 0
-        for k, v in MPBCountPerDay.items():
+        for k, v in highestCountPerDay.items():
             xDay = datetime.strptime( k, "%Y-%m-%d")
             if xDay < single_date:
                 totalCount3 += v
 
-        statList['MPBCount'][single_day] = totalCount3
+        statList['highestCount'][single_day] = totalCount3
 
 def makeStrong(text):
     return "<strong>" + str(text) + "</strong>"
@@ -450,7 +450,7 @@ def createReport(statList):
         fp, statList['regressionCount'], "Open Regressions",
         "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&keywords=regression%2C &keywords_type=allwords&query_format=advanced&resolution=---", "green")
     createEvolutionSection(
-        fp, statList['MPBCount'], "Most Pressing Bugs",
+        fp, statList['highestCount'], "Highest Priority Bugs",
         "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&priority=highest&query_format=advanced&resolution=---", "sandybrown")
 
     print(makeStrong('Thank you all for making Libreoffice rock!'), file=fp)
commit 99b612d61b4405d5855cd951195824be06ea964d
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Jan 3 12:40:54 2019 +0100
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Jan 3 21:10:38 2019 +0100

    QA: Add links in evolution sections and unify

diff --git a/qa/createBlogReport.py b/qa/createBlogReport.py
index c7c9a17..83e14bb 100755
--- a/qa/createBlogReport.py
+++ b/qa/createBlogReport.py
@@ -411,6 +411,15 @@ def createSection(fp, value, sectionName, action, actionPerson, plotColor):
 
     createPlot(value['day'], "bar", sectionName + " Per Day", sectionName, plotColor)
 
+def createEvolutionSection(fp, value, sectionName, urlParam, color):
+    urlPath = "https://bugs.documentfoundation.org/buglist.cgi?"
+    print(makeH2("Evolution of {}".format(sectionName)), file=fp)
+    print("Check the current list of {} {}".format(sectionName.lower(), makeLink(urlPath + urlParam, "here")), file=fp)
+    print('<img src="PATH_HERE/{}.png" alt="" width="640" height="480" class="alignnone size-full" />'.format(
+        sectionName.replace(" ", "_")), file=fp)
+    createPlot(value, "line", sectionName + " Per Day", sectionName, color)
+
+
 def createList(fp, value, listName):
     urlPath = "https://bugs.documentfoundation.org/show_bug.cgi?id="
     print(makeStrong(listName), file=fp)
@@ -434,23 +443,15 @@ def createReport(statList):
     createSection(fp, statList['keywords']['regression'], "Regression Bugs", "set as regressions", "", "mediumpurple")
     createSection(fp, statList['keywords']['bisected'], "Bisected Bugs", "bisected", "Bisecters", "orange")
 
-    print(makeH2("Evolution of Unconfirmed Bugs"), file=fp)
-    print(file=fp)
-    print('<img src="PATH_HERE/Unconfirmed_Bugs.png" alt="" width="640" height="480" class="alignnone size-full" />', file=fp)
-    print(file=fp)
-    createPlot(statList['unconfirmedCount'], "line", "Unconfirmed Bugs Per Day", "Unconfirmed Bugs", "blue")
-
-    print(makeH2("Evolution of Open Regressions"), file=fp)
-    print(file=fp)
-    print('<img src="PATH_HERE/open_regressions.png" alt="" width="640" height="480" class="alignnone size-full" />', file=fp)
-    print(file=fp)
-    createPlot(statList['regressionCount'], "line", "Open regressions Per Day", "open regressions", "green")
-
-    print(makeH2("Evolution of Most Pressing Bugs"), file=fp)
-    print(file=fp)
-    print('<img src="PATH_HERE/Most_Pressing_Bugs.png" alt="" width="640" height="480" class="alignnone size-full" />', file=fp)
-    print(file=fp)
-    createPlot(statList['MPBCount'], "line", "Most Pressing Bugs Per Day", "Most Pressing Bugs", "orange")
+    createEvolutionSection(
+        fp, statList['unconfirmedCount'], "Unconfirmed Bugs",
+        "bug_status=UNCONFIRMED&query_format=advanced&resolution=---", "blue")
+    createEvolutionSection(
+        fp, statList['regressionCount'], "Open Regressions",
+        "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&keywords=regression%2C &keywords_type=allwords&query_format=advanced&resolution=---", "green")
+    createEvolutionSection(
+        fp, statList['MPBCount'], "Most Pressing Bugs",
+        "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&priority=highest&query_format=advanced&resolution=---", "sandybrown")
 
     print(makeStrong('Thank you all for making Libreoffice rock!'), file=fp)
     print(makeStrong('Join us and help to keep LibreOffice super reliable!'), file=fp)


More information about the Libreoffice-commits mailing list