qa/bugzillaAutomation.py | 2 qa/bugzillaChecker.py | 2 qa/bugzillaDataAnalyzer.py | 128 ++++++++++++++++++++++++++------------------- qa/createBlogReport.py | 40 +++++++++----- qa/createCrashesList.py | 2 qa/createMassPingLists.py | 2 qa/createWeeklyReport.py | 2 qa/createWikiStats.py | 2 8 files changed, 107 insertions(+), 73 deletions(-)
New commits: commit 2853a975acf3bb2b75780d760f25197082a0149f Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Jan 7 21:55:31 2019 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Jan 7 21:55:31 2019 +0100 QA: doublecheck this just in case diff --git a/qa/bugzillaDataAnalyzer.py b/qa/bugzillaDataAnalyzer.py index 5ea3207..44c7228 100755 --- a/qa/bugzillaDataAnalyzer.py +++ b/qa/bugzillaDataAnalyzer.py @@ -232,7 +232,7 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): newStatus = None - if actionDate >= cfg['reportPeriod']: + if actionDate >= cfg['reportPeriod'] and row['resolution'] == 'FIXED': if addedResolution == 'FIXED': fixedBugs[rowId] = actionDate isFixed = True commit a64e432dbf048069b1d8969bfdfa792c895fd54e Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Jan 7 21:26:33 2019 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Jan 7 21:28:07 2019 +0100 QA: Some bugs are set as FIXED without a commit notification ( part 2 ) diff --git a/qa/createBlogReport.py b/qa/createBlogReport.py index a5e974e..8889dc0 100755 --- a/qa/createBlogReport.py +++ b/qa/createBlogReport.py @@ -82,7 +82,7 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): regressionsCountPerDay = {} highestCountPerDay = {} highCountPerDay = {} - fixedBugs = [] + fixedBugs = {} for key, row in bugzillaData['bugs'].items(): rowId = row['id'] @@ -267,12 +267,12 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): if check_date(actionDate, cfg): addedResolution = change['added'] removedResolution = change['removed'] - if addedResolution == 'FIXED' and not removedResolution: - fixedBugs.append(rowId) + if addedResolution == 'FIXED': + fixedBugs[rowId] = actionDate isFixed = True - elif removedResolution == 'FIXED' and isFixed and not addedResolution: - fixedBugs.pop() + elif removedResolution == 'FIXED' and isFixed: + del fixedBugs[rowId] isFixed = False elif change['field_name'] == 'keywords': @@ -309,7 +309,8 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): commentMail = None comments = row['comments'][1:] - bugFixers = set() + bugFixers = [] + commitNoticiation=False for idx, comment in enumerate(comments): commentMail = comment['creator'] commentDate = datetime.strptime(comment['time'], "%Y-%m-%dT%H:%M:%SZ") @@ -317,18 +318,24 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): common.util_check_bugzilla_mail( statList, commentMail, '', commentDate, rowId) - if check_date(commentDate, cfg) and rowId in fixedBugs: + if rowId in fixedBugs: if commentMail == "libreoffice-comm...@lists.freedesktop.org": commentText = comment['text'] author = commentText.split(' committed a patch related')[0] if author not in bugFixers: - bugFixers.add(author) + bugFixers.append(author) diffTime = (commentDate - creationDate).days commentDay = commentDate.strftime("%Y-%m-%d") util_increase_action(statList['fixed'], rowId, author, commentDay, diffTime) + commitNoticiation=True if 'crash' in row['summary'].lower() or row['priority'] == "highest": statList['criticalFixed'][rowId]= {'summary': row['summary'], 'author': author} + if rowId in fixedBugs and not commitNoticiation: + actionDate = fixedBugs[rowId] + actionDay = actionDate.strftime("%Y-%m-%d") + diffTime = (actionDate - creationDate).days + util_increase_action(statList['fixed'], rowId, 'UNKNOWN', actionDay, diffTime) for person in row['cc_detail']: email = person['email'] @@ -447,6 +454,8 @@ def createSection(fp, value, sectionName, action, actionPerson, plotColor): if itCount > 10: break if action == 'fixed': + if item[0] == 'UNKNOWN': + continue print(makeLI("{} ( {} )".format(item[0], item[1])), file=fp) else: print(makeLI("{} ( {} )".format(statList['people'][item[0]]['name'], item[1])), file=fp) commit 597fdcef7d95c579a5adb53332afe1263ac7016f Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Jan 7 20:47:35 2019 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Jan 7 21:28:07 2019 +0100 QA: Some bugs are set as FIXED without a commit notification diff --git a/qa/bugzillaDataAnalyzer.py b/qa/bugzillaDataAnalyzer.py index f824e05..5ea3207 100755 --- a/qa/bugzillaDataAnalyzer.py +++ b/qa/bugzillaDataAnalyzer.py @@ -114,9 +114,8 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): statList['addDate'] = datetime.date.today().strftime('%Y-%m-%d') - fixedBugs = [] + fixedBugs = {} for key, row in bugzillaData['bugs'].items(): - rowId = row['id'] #Ignore META bugs and deletionrequest bugs. if not row['summary'].lower().startswith('[meta]') and row['component'].lower() != 'deletionrequest': @@ -126,6 +125,7 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): if creationDate > statNewDate: statNewDate = creationDate + rowId = row['id'] rowStatus = row['status'] rowResolution = row['resolution'] @@ -179,8 +179,7 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): removedStatus = change['removed'] if actionDate >= cfg['reportPeriod']: - if not common.isClosed(removedStatus) and \ - common.isClosed(addedStatus) and common.isClosed(row['status']): + if common.isClosed(addedStatus) and common.isClosed(row['status']): if isClosed: util_decrease_action(statList[kindOfTicket]['closed'], rowId, creatorMail, rowStatus, rowProduct, rowComponent, rowResolution, rowPlatform, rowSystem, weekClosed, monthClosed) @@ -235,11 +234,11 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): if actionDate >= cfg['reportPeriod']: if addedResolution == 'FIXED': - fixedBugs.append(rowId) + fixedBugs[rowId] = actionDate isFixed = True elif removedResolution == 'FIXED' and isFixed: - fixedBugs.pop() + del fixedBugs[rowId] isFixed = False elif change['field_name'] == 'keywords': @@ -258,7 +257,8 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): commentMail = None comments = row['comments'][1:] - bugFixers = set() + bugFixers = [] + commitNoticiation=False for idx, comment in enumerate(comments): commentMail = comment['creator'] commentDate = datetime.datetime.strptime(comment['time'], "%Y-%m-%dT%H:%M:%SZ") @@ -266,12 +266,12 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): common.util_check_bugzilla_mail( statList, commentMail, '', commentDate, rowId) - if commentDate >= cfg['reportPeriod'] and rowId in fixedBugs: + if rowId in fixedBugs: if commentMail == "libreoffice-comm...@lists.freedesktop.org": commentText = comment['text'] author = commentText.split(' committed a patch related')[0] if author not in bugFixers: - bugFixers.add(author) + bugFixers.append(author) difftimeFixed = (commentDate - creationDate).days weekFixed = str(commentDate.year) + '-' + str(commentDate.strftime("%V")) monthFixed = str(commentDate.year) + '-' + str(commentDate.strftime("%m")) @@ -280,6 +280,18 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): util_increase_action(statList['all']['fixed'], rowId, author, rowStatus, rowProduct, rowComponent, rowResolution, rowPlatform, rowSystem, weekFixed, monthFixed, difftimeFixed) + commitNoticiation=True + + if rowId in fixedBugs and not commitNoticiation: + actionDate = fixedBugs[rowId] + difftimeFixed = (actionDate - creationDate).days + weekFixed = str(actionDate.year) + '-' + str(actionDate.strftime("%V")) + monthFixed = str(actionDate.year) + '-' + str(actionDate.strftime("%m")) + util_increase_action(statList[kindOfTicket]['fixed'], rowId, "UNKNOWN", rowStatus, rowProduct, + rowComponent, rowResolution, rowPlatform, rowSystem, weekFixed, monthFixed, difftimeFixed) + + util_increase_action(statList['all']['fixed'], rowId, "UNKNOWN", rowStatus, rowProduct, + rowComponent, rowResolution, rowPlatform, rowSystem, weekFixed, monthFixed, difftimeFixed) for person in row['cc_detail']: email = person['email'] @@ -318,13 +330,15 @@ def util_print_QA_line_data(statList, dValue, kind, action, total_count): count = 0 for i1,i2 in d_view: try: - count += 1 if count <= total_count: usersString += statList['people'][i2]['name'] + ' ( ' + str(i1) + ' ) \n' else: break except: + if i2 == 'UNKNOWN': + continue usersString += i2 + ' ( ' + str(i1) + ' ) \n' + count += 1 print(usersString[:-2], file=fp) commit 3f5697a82ff9a20626874c293319ddf47543af1c Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Jan 7 20:04:37 2019 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Jan 7 21:28:07 2019 +0100 QA: make sure we ignore all deletionrequest components diff --git a/qa/bugzillaAutomation.py b/qa/bugzillaAutomation.py index b8489a3..d4eee5b 100755 --- a/qa/bugzillaAutomation.py +++ b/qa/bugzillaAutomation.py @@ -36,7 +36,7 @@ def analyze_bugzilla(statList, bugzillaData, cfg): rowId = row['id'] #Ignore META bugs and deletionrequest bugs. - if not row['summary'].lower().startswith('[meta]') and row['component'] != 'deletionrequest': + if not row['summary'].lower().startswith('[meta]') and row['component'].lower() != 'deletionrequest': rowStatus = row['status'] rowResolution = row['resolution'] diff --git a/qa/bugzillaChecker.py b/qa/bugzillaChecker.py index 1b459a5..c2ba268 100755 --- a/qa/bugzillaChecker.py +++ b/qa/bugzillaChecker.py @@ -70,7 +70,7 @@ def analyze_bugzilla_checkers(statList, bugzillaData, cfg): rowId = row['id'] #Ignore META bugs and deletionrequest bugs. - if not row['summary'].lower().startswith('[meta]') and row['component'] != 'deletionrequest': + if not row['summary'].lower().startswith('[meta]') and row['component'].lower() != 'deletionrequest': creationDate = datetime.datetime.strptime(row['creation_time'], "%Y-%m-%dT%H:%M:%SZ") rowStatus = row['status'] diff --git a/qa/bugzillaDataAnalyzer.py b/qa/bugzillaDataAnalyzer.py index 8be3a0e..f824e05 100755 --- a/qa/bugzillaDataAnalyzer.py +++ b/qa/bugzillaDataAnalyzer.py @@ -119,7 +119,7 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): rowId = row['id'] #Ignore META bugs and deletionrequest bugs. - if not row['summary'].lower().startswith('[meta]') and row['component'] != 'deletionrequest': + if not row['summary'].lower().startswith('[meta]') and row['component'].lower() != 'deletionrequest': creationDate = datetime.datetime.strptime(row['creation_time'], "%Y-%m-%dT%H:%M:%SZ") if creationDate < statOldDate: statOldDate = creationDate diff --git a/qa/createBlogReport.py b/qa/createBlogReport.py index 19e5e27..a5e974e 100755 --- a/qa/createBlogReport.py +++ b/qa/createBlogReport.py @@ -87,7 +87,7 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): rowId = row['id'] #Ignore META bugs and deletionrequest bugs. - if not row['summary'].lower().startswith('[meta]') and row['component'] != 'deletionrequest': + if not row['summary'].lower().startswith('[meta]') and row['component'].lower() != 'deletionrequest': creationDate = datetime.strptime(row['creation_time'], "%Y-%m-%dT%H:%M:%SZ") diff --git a/qa/createCrashesList.py b/qa/createCrashesList.py index 1db5b8f..5c1f5bf 100755 --- a/qa/createCrashesList.py +++ b/qa/createCrashesList.py @@ -21,7 +21,7 @@ def analyze_bugzilla_checkers(statList, bugzillaData): rowId = row['id'] #Ignore META bugs and deletionrequest bugs. - if not row['summary'].lower().startswith('[meta]') and row['component'] != 'deletionrequest': + if not row['summary'].lower().startswith('[meta]') and row['component'].lower() != 'deletionrequest': rowStatus = row['status'] rowResolution = row['resolution'] diff --git a/qa/createMassPingLists.py b/qa/createMassPingLists.py index 619b650..a13f80f 100755 --- a/qa/createMassPingLists.py +++ b/qa/createMassPingLists.py @@ -22,7 +22,7 @@ def analyze_bugzilla(statList, bugzillaData): for key, row in bugzillaData['bugs'].items(): #Ignore META bugs and deletionrequest bugs. - if not row['summary'].lower().startswith('[meta]') and row['component'] != 'deletionrequest': + if not row['summary'].lower().startswith('[meta]') and row['component'].lower() != 'deletionrequest': rowId = row['id'] comments = row['comments'][1:] diff --git a/qa/createWeeklyReport.py b/qa/createWeeklyReport.py index d4c72f8..34896dd 100755 --- a/qa/createWeeklyReport.py +++ b/qa/createWeeklyReport.py @@ -43,7 +43,7 @@ def analyze_bugzilla_weeklyReport(statList, bugzillaData, cfg): rowId = row['id'] #Ignore META bugs and deletionrequest bugs. - if not row['summary'].lower().startswith('[meta]') and row['component'] != 'deletionrequest': + if not row['summary'].lower().startswith('[meta]') and row['component'].lower() != 'deletionrequest': creationDate = datetime.datetime.strptime(row['creation_time'], "%Y-%m-%dT%H:%M:%SZ") if creationDate < statOldDate: statOldDate = creationDate diff --git a/qa/createWikiStats.py b/qa/createWikiStats.py index ca672dd..7dba64b 100755 --- a/qa/createWikiStats.py +++ b/qa/createWikiStats.py @@ -95,7 +95,7 @@ def analyze_bugzilla_wiki_stats(statList, bugzillaData, cfg): rowId = row['id'] #Ignore META bugs and deletionrequest bugs. - if not row['summary'].lower().startswith('[meta]') and row['component'] != 'deletionrequest': + if not row['summary'].lower().startswith('[meta]') and row['component'].lower() != 'deletionrequest': creationDate = datetime.datetime.strptime(row['creation_time'], "%Y-%m-%dT%H:%M:%SZ") if creationDate < statOldDate: statOldDate = creationDate commit 965dc580e64bda67cecade6a6cb949903f0fdd42 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Jan 7 19:34:45 2019 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Jan 7 21:28:07 2019 +0100 QA: Get who fixes the issue from the commit notification diff --git a/qa/bugzillaDataAnalyzer.py b/qa/bugzillaDataAnalyzer.py index faa5768..8be3a0e 100755 --- a/qa/bugzillaDataAnalyzer.py +++ b/qa/bugzillaDataAnalyzer.py @@ -114,6 +114,7 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): statList['addDate'] = datetime.date.today().strftime('%Y-%m-%d') + fixedBugs = [] for key, row in bugzillaData['bugs'].items(): rowId = row['id'] @@ -224,32 +225,23 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): else: newStatus = addedStatus - if actionDate >= cfg['reportPeriod'] and addedStatus == 'RESOLVED_FIXED' and \ - removedStatus != 'REOPENED' and row['resolution'] == 'FIXED': - if isFixed: - util_decrease_action(statList[kindOfTicket]['fixed'], rowId, creatorMail, rowStatus, rowProduct, - rowComponent, rowResolution, rowPlatform, rowSystem, weekFixed, monthFixed) - - util_decrease_action(statList['all']['fixed'], rowId, creatorMail, rowStatus, rowProduct, - rowComponent, rowResolution, rowPlatform, rowSystem, weekFixed, monthFixed) - - weekFixed = str(actionDate.year) + '-' + str(actionDate.strftime("%V")) - monthFixed = str(actionDate.year) + '-' + str(actionDate.strftime("%m")) - difftimeFixed = (actionDate - creationDate).days - util_increase_action(statList[kindOfTicket]['fixed'], rowId, actionMail, rowStatus, rowProduct, - rowComponent, rowResolution, rowPlatform, rowSystem, weekFixed, monthFixed, difftimeFixed) - - util_increase_action(statList['all']['fixed'], rowId, actionMail, rowStatus, rowProduct, - rowComponent, rowResolution, rowPlatform, rowSystem, weekFixed, monthFixed, difftimeFixed) - - isFixed = True - elif change['field_name'] == 'resolution': + addedResolution = change['added'] + removedResolution = change['removed'] if newStatus: - addedStatus = newStatus + "_" + change['added'] + addedStatus = newStatus + "_" + addedResolution newStatus = None + if actionDate >= cfg['reportPeriod']: + if addedResolution == 'FIXED': + fixedBugs.append(rowId) + isFixed = True + + elif removedResolution == 'FIXED' and isFixed: + fixedBugs.pop() + isFixed = False + elif change['field_name'] == 'keywords': keywordsAdded = change['added'].split(", ") for keyword in keywordsAdded: @@ -266,6 +258,7 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): commentMail = None comments = row['comments'][1:] + bugFixers = set() for idx, comment in enumerate(comments): commentMail = comment['creator'] commentDate = datetime.datetime.strptime(comment['time'], "%Y-%m-%dT%H:%M:%SZ") @@ -273,6 +266,21 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): common.util_check_bugzilla_mail( statList, commentMail, '', commentDate, rowId) + if commentDate >= cfg['reportPeriod'] and rowId in fixedBugs: + if commentMail == "libreoffice-comm...@lists.freedesktop.org": + commentText = comment['text'] + author = commentText.split(' committed a patch related')[0] + if author not in bugFixers: + bugFixers.add(author) + difftimeFixed = (commentDate - creationDate).days + weekFixed = str(commentDate.year) + '-' + str(commentDate.strftime("%V")) + monthFixed = str(commentDate.year) + '-' + str(commentDate.strftime("%m")) + util_increase_action(statList[kindOfTicket]['fixed'], rowId, author, rowStatus, rowProduct, + rowComponent, rowResolution, rowPlatform, rowSystem, weekFixed, monthFixed, difftimeFixed) + + util_increase_action(statList['all']['fixed'], rowId, author, rowStatus, rowProduct, + rowComponent, rowResolution, rowPlatform, rowSystem, weekFixed, monthFixed, difftimeFixed) + for person in row['cc_detail']: email = person['email'] if commentMail == email or actionMail == email: @@ -316,7 +324,7 @@ def util_print_QA_line_data(statList, dValue, kind, action, total_count): else: break except: - continue + usersString += i2 + ' ( ' + str(i1) + ' ) \n' print(usersString[:-2], file=fp) commit 570b7766b9271d336b2124b5708965c9df468952 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Jan 7 18:29:56 2019 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Jan 7 21:28:07 2019 +0100 QA: Do not use is_confirmed field here diff --git a/qa/bugzillaDataAnalyzer.py b/qa/bugzillaDataAnalyzer.py index 2de0c3a..faa5768 100755 --- a/qa/bugzillaDataAnalyzer.py +++ b/qa/bugzillaDataAnalyzer.py @@ -173,9 +173,32 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): # Use this variable in case the status is set before the resolution newStatus = None for change in action['changes']: - if change['field_name'] == 'is_confirmed': - if actionDate >= cfg['reportPeriod'] and row['is_confirmed']: - if change['added'] == "1": + if change['field_name'] == 'status': + addedStatus = change['added'] + removedStatus = change['removed'] + + if actionDate >= cfg['reportPeriod']: + if not common.isClosed(removedStatus) and \ + common.isClosed(addedStatus) and common.isClosed(row['status']): + if isClosed: + util_decrease_action(statList[kindOfTicket]['closed'], rowId, creatorMail, rowStatus, rowProduct, + rowComponent, rowResolution, rowPlatform, rowSystem, weekClosed, monthClosed) + + util_decrease_action(statList['all']['closed'], rowId, creatorMail, rowStatus, rowProduct, + rowComponent, rowResolution, rowPlatform, rowSystem, weekClosed, monthClosed) + + weekClosed = str(actionDate.year) + '-' + str(actionDate.strftime("%V")) + monthClosed = str(actionDate.year) + '-' + str(actionDate.strftime("%m")) + difftimeClosed = (actionDate - creationDate).days + util_increase_action(statList[kindOfTicket]['closed'], rowId, actionMail, rowStatus, rowProduct, + rowComponent, rowResolution, rowPlatform, rowSystem, weekClosed, monthClosed, difftimeClosed) + + util_increase_action(statList['all']['closed'], rowId, actionMail, rowStatus, rowProduct, + rowComponent, rowResolution, rowPlatform, rowSystem, weekClosed, monthClosed, difftimeClosed) + + isClosed = True + + if removedStatus == "UNCONFIRMED": weekConfirmed = str(actionDate.year) + '-' + str(actionDate.strftime("%V")) monthConfirmed = str(actionDate.year) + '-' + str(actionDate.strftime("%m")) difftimeConfirmed = (actionDate - creationDate).days @@ -184,41 +207,16 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg): util_increase_action(statList['all']['confirmed'], rowId, actionMail, rowStatus, rowProduct, rowComponent, rowResolution, rowPlatform, rowSystem, weekConfirmed, monthConfirmed, difftimeConfirmed) - isConfirmed = True - elif isConfirmed: + elif addedStatus == 'UNCONFIRMED' and isConfirmed: util_decrease_action(statList[kindOfTicket]['confirmed'], rowId, creatorMail, rowStatus, rowProduct, rowComponent, rowResolution, rowPlatform, rowSystem, weekConfirmed, monthConfirmed) util_decrease_action(statList['all']['confirmed'], rowId, creatorMail, rowStatus, rowProduct, rowComponent, rowResolution, rowPlatform, rowSystem, weekConfirmed, monthConfirmed) - isConfirmed = False - if change['field_name'] == 'status': - addedStatus = change['added'] - removedStatus = change['removed'] - - if actionDate >= cfg['reportPeriod'] and not common.isClosed(removedStatus) and \ - common.isClosed(addedStatus) and common.isClosed(row['status']): - if isClosed: - util_decrease_action(statList[kindOfTicket]['closed'], rowId, creatorMail, rowStatus, rowProduct, - rowComponent, rowResolution, rowPlatform, rowSystem, weekClosed, monthClosed) - - util_decrease_action(statList['all']['closed'], rowId, creatorMail, rowStatus, rowProduct, - rowComponent, rowResolution, rowPlatform, rowSystem, weekClosed, monthClosed) - - weekClosed = str(actionDate.year) + '-' + str(actionDate.strftime("%V")) - monthClosed = str(actionDate.year) + '-' + str(actionDate.strftime("%m")) - difftimeClosed = (actionDate - creationDate).days - util_increase_action(statList[kindOfTicket]['closed'], rowId, actionMail, rowStatus, rowProduct, - rowComponent, rowResolution, rowPlatform, rowSystem, weekClosed, monthClosed, difftimeClosed) - - util_increase_action(statList['all']['closed'], rowId, actionMail, rowStatus, rowProduct, - rowComponent, rowResolution, rowPlatform, rowSystem, weekClosed, monthClosed, difftimeClosed) - - isClosed = True if addedStatus == 'RESOLVED' or addedStatus == 'VERIFIED': if(rowResolution): commit c462477be7ceff664e5948a01b4add5f493cda7c Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Jan 7 18:08:09 2019 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Jan 7 21:28:07 2019 +0100 QA: Show tick labels depending on the total number of ticks diff --git a/qa/createBlogReport.py b/qa/createBlogReport.py index 32aee74..19e5e27 100755 --- a/qa/createBlogReport.py +++ b/qa/createBlogReport.py @@ -10,6 +10,7 @@ import common from datetime import datetime, timedelta import argparse +import math import matplotlib import matplotlib.pyplot as plt @@ -414,10 +415,14 @@ def createPlot(valueDict, plotType, plotTitle, plotLabel, plotColor): plt.legend(); ax = plt.gca() ax.grid(axis="y", linestyle='--') - #Remove even labels - for count, i in enumerate(ax.get_xticklabels()): - if count % 2 == 1: - i.set_visible(False) + #Remove labels depending on number of elements + total = math.ceil( len(ax.get_xticklabels()) / 20 ) + for idx, val in enumerate(ax.get_xticklabels()): + #Hide all tick labels by default, otherwise it doesn't work + val.set_visible(False) + if idx % total == 0: + val.set_visible(True) + #plt.show() filePath = "/tmp/" + plotLabel.replace(" ", "_") + ".png" print("Saving plot " + plotLabel + " to " + filePath) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits