qa/bugzillaAutomation.py | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
New commits: commit 556dc1fa6b0218249eb4b6951283f5e14b3d2e32 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed Dec 4 15:03:54 2019 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Dec 4 15:08:24 2019 +0100 QA: Increase retesting time to 2 years Write comment even if last comment is a retesting comment if so, mark previous one as obsolete before writing the new one diff --git a/qa/bugzillaAutomation.py b/qa/bugzillaAutomation.py index 1514a5c..182fe18 100755 --- a/qa/bugzillaAutomation.py +++ b/qa/bugzillaAutomation.py @@ -14,7 +14,7 @@ import datetime import os import json -untouchedPeriodDays = 365 +untouchedPeriodDays = 730 needInfoPingPeriodDays = 180 @@ -126,13 +126,7 @@ def analyze_bugzilla(statList, bugzillaData, cfg): comments[-1]['creator'] == row['creator']: statList['needInfoToUnconfirmed'][rowId] = rowCreator - if 'MassPing-UntouchedBug' in comments[-1]["text"]: - if rowStatus != 'NEEDINFO': - if "obsolete" not in [x.lower() for x in comments[-1]["tags"]]: - statList['tags']['addObsolete'].remove(comments[-1]["id"]) - else: - statList['tags']['removeObsolete'].add(comments[-1]["id"]) - elif 'MassPing-NeedInfo-Ping' in comments[-1]["text"]: + if 'MassPing-NeedInfo-Ping' in comments[-1]["text"]: if rowStatus != 'NEEDINFO': if "obsolete" not in [x.lower() for x in comments[-1]["tags"]]: statList['tags']['addObsolete'].remove(comments[-1]["id"]) @@ -150,11 +144,23 @@ def analyze_bugzilla(statList, bugzillaData, cfg): else: statList['tags']['removeObsolete'].add(comments[-1]["id"]) else: + if 'MassPing-UntouchedBug' in comments[-1]["text"]: + if rowStatus != 'NEEDINFO': + if "obsolete" not in [x.lower() for x in comments[-1]["tags"]]: + statList['tags']['addObsolete'].remove(comments[-1]["id"]) + else: + statList['tags']['removeObsolete'].add(comments[-1]["id"]) + if datetime.datetime.strptime(row['last_change_time'], "%Y-%m-%dT%H:%M:%SZ") < cfg['untouchedPeriod'] and \ rowStatus == 'NEW' and 'needsUXEval' not in rowKeywords and 'easyHack' not in rowKeywords and \ row['component'] != 'Documentation' and (row['product'] == 'LibreOffice' or \ row['product'] == 'Impress Remote') and row['severity'] != 'enhancement': + statList['untouched'][rowId] = rowCreator + if 'MassPing-UntouchedBug' in comments[-1]["text"]: + statList['tags']['addObsolete'].add(comments[-1]["id"]) + if comments[-1]["id"] in statList['tags']['removeObsolete']: + statList['tags']['removeObsolete'].remove(comments[-1]["id"]) def post_comment(statList, keyInStatList, commentId, comment, addFirstLine, changeCommand=""): for bugId, creator in statList[keyInStatList].items(): @@ -165,7 +171,8 @@ def post_comment(statList, keyInStatList, commentId, comment, addFirstLine, chan rawData = json.loads(rGet.text) rGet.close() - if commentId not in rawData['bugs'][bugId]['comments'][-1]['text']: + if commentId not in rawData['bugs'][bugId]['comments'][-1]['text'] or \ + datetime.datetime.strptime(rawData['bugs'][bugId]['comments'][-1]['creation_time'], "%Y-%m-%dT%H:%M:%SZ") < cfg['untouchedPeriod']: if addFirstLine: firstLine = "Dear " + creator + ",\\n\\n" fullComment = firstLine + comment _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits