qa/common.py | 13 +++++++++++-- qa/createWeeklyReport.py | 26 ++++++++++++++++---------- 2 files changed, 27 insertions(+), 12 deletions(-)
New commits: commit 04fec35e85c2c7b49feeb8e1185b69ed2d574447 Author: Xisco Fauli <[email protected]> AuthorDate: Tue Dec 4 15:10:05 2018 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Dec 4 15:10:05 2018 +0100 QA: Fix problem when bugs were moved from resolved to not resolved diff --git a/qa/createWeeklyReport.py b/qa/createWeeklyReport.py index 8e2f155..d4c72f8 100755 --- a/qa/createWeeklyReport.py +++ b/qa/createWeeklyReport.py @@ -107,7 +107,7 @@ def analyze_bugzilla_weeklyReport(statList, bugzillaData, cfg): if removedStatus == 'RESOLVED' or removedStatus == 'VERIFIED': if oldResolution: - removedStatus = removedStatus + "_" + removedResolution + removedStatus = removedStatus + "_" + oldResolution oldResolution = None else: oldStatus = removedStatus @@ -126,12 +126,15 @@ def analyze_bugzilla_weeklyReport(statList, bugzillaData, cfg): else: newStatus = addedStatus else: - if actionDate >= cfg['reportPeriod']: - keyValue = removedStatus + '-' + addedStatus - if keyValue not in statList['status_changed']: - statList['status_changed'][keyValue] = {'id':[], 'author':[]} - statList['status_changed'][keyValue]['id'].append(rowId) - statList['status_changed'][keyValue]['author'].append(actionMail) + if removedStatus == 'RESOLVED' or removedStatus == 'VERIFIED': + newStatus = addedStatus + else: + if actionDate >= cfg['reportPeriod']: + keyValue = removedStatus + '-' + addedStatus + if keyValue not in statList['status_changed']: + statList['status_changed'][keyValue] = {'id':[], 'author':[]} + statList['status_changed'][keyValue]['id'].append(rowId) + statList['status_changed'][keyValue]['author'].append(actionMail) elif change['field_name'] == 'resolution': addedResolution = change['added'] commit cc3894ff8d3fcf351d15f8257d33306c719e1ab4 Author: Xisco Fauli <[email protected]> AuthorDate: Tue Dec 4 14:18:01 2018 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Dec 4 14:18:46 2018 +0100 QA: Show newest date instead of today diff --git a/qa/createWeeklyReport.py b/qa/createWeeklyReport.py index f42a947..8e2f155 100755 --- a/qa/createWeeklyReport.py +++ b/qa/createWeeklyReport.py @@ -39,8 +39,6 @@ def analyze_bugzilla_weeklyReport(statList, bugzillaData, cfg): statNewDate = statList['stat']['newest'] statOldDate = statList['stat']['oldest'] - statList['addDate'] = datetime.date.today().strftime('%Y-%m-%d') - for key, row in bugzillaData['bugs'].items(): rowId = row['id'] @@ -416,7 +414,7 @@ def create_weekly_Report(statList) : print('Thank you all for making Libreoffice rock!', file=fp) print(file=fp) print('Generated on {} based on stats from {}. Note: Metabugs are ignored.'.format( - datetime.datetime.now().strftime("%Y-%m-%d"), statList['addDate']), file=fp) + datetime.datetime.now().strftime("%Y-%m-%d"), statList['stat']['newest']), file=fp) print(file=fp) print('Regards', file=fp) fp.close() commit 776b9c7db26bb094478dcbb49965346a973dc4cf Author: Xisco Fauli <[email protected]> AuthorDate: Tue Dec 4 13:11:59 2018 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Dec 4 14:11:00 2018 +0100 QA: Use the latest user name if it's changes diff --git a/qa/common.py b/qa/common.py index f1a2e8e..047a50f 100755 --- a/qa/common.py +++ b/qa/common.py @@ -79,6 +79,7 @@ def util_create_person_bugzilla(email, name): 'email': email, 'oldest': datetime.datetime.now(), 'newest': datetime.datetime(2001, 1, 1), + 'newestName': datetime.datetime(2001, 1, 1), 'bugs': set() } @@ -86,8 +87,16 @@ def util_check_bugzilla_mail(statList, mail, name, date=None, bug=None): if mail not in statList['people']: statList['people'][mail] = util_create_person_bugzilla(mail, name) - if name and not statList['people'][mail]['name']: - statList['people'][mail]['name'] = name + if name: + if not statList['people'][mail]['name']: + statList['people'][mail]['name'] = name + if date: + statList['people'][mail]['newestName'] = date + else: + if name != statList['people'][mail]['name'] and date and \ + date > statList['people'][mail]['newestName']: + statList['people'][mail]['name'] = name + statList['people'][mail]['newestName'] = date if date: if date < statList['people'][mail]['oldest']: diff --git a/qa/createWeeklyReport.py b/qa/createWeeklyReport.py index a142e18..f42a947 100755 --- a/qa/createWeeklyReport.py +++ b/qa/createWeeklyReport.py @@ -234,6 +234,11 @@ def analyze_bugzilla_weeklyReport(statList, bugzillaData, cfg): statList['comments_count'][commentMail] = 0 statList['comments_count'][commentMail] += 1 + for person in row['cc_detail']: + email = person['email'] + if commentMail == email or actionMail == email: + common.util_check_bugzilla_mail(statList, email, person['real_name']) + elif row['summary'].lower().startswith('[meta]'): statList['metabugAlias'][rowId] = row['alias'] _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
