summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2019-05-08 23:53:50 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2019-05-08 23:53:50 +0200
commit974fbaa41d33f114514954b718bea0cef8ccc34d (patch)
treefe5782cf5426d3e27a68b37e261f862b351bd060 /qa
parent0a21ff5fc28a6598e06c1193391e4ecc76dde760 (diff)
QA: Automatically move NEEDINFO bugs back to UNCONFIRMED...
if the last comment is from the reporter
Diffstat (limited to 'qa')
-rwxr-xr-xqa/bugzillaAutomation.py34
-rw-r--r--qa/comments.py2
2 files changed, 26 insertions, 10 deletions
diff --git a/qa/bugzillaAutomation.py b/qa/bugzillaAutomation.py
index afa71a15..dc6ba3b5 100755
--- a/qa/bugzillaAutomation.py
+++ b/qa/bugzillaAutomation.py
@@ -32,7 +32,8 @@ def util_create_statList():
},
'untouched': {},
'needInfoPing': {},
- 'needInfoFollowUpPing': {}
+ 'needInfoFollowUpPing': {},
+ 'needInfoToUnconfirmed': {}
}
def analyze_bugzilla(statList, bugzillaData, cfg):
print("Analyze bugzilla\n", end="", flush=True)
@@ -68,12 +69,16 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
"obsolete" not in [x.lower() for x in comment["tags"]] and \
('MassPing-UntouchedBug' in comment["text"] or \
comment["text"].startswith("A polite ping, still working on this bug") or \
+ '[Automated Action]' in comment["text"] or \
'MassPing-NeedInfo' in comment["text"]):
statList['tags']['addObsolete'].add(comment["id"])
if len(comments) > 0:
- if 'MassPing-UntouchedBug' in comments[-1]["text"]:
+ if rowStatus == 'NEEDINFO' and \
+ 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"])
@@ -103,7 +108,7 @@ def analyze_bugzilla(statList, bugzillaData, cfg):
row['product'] == 'Impress Remote') and row['severity'] != 'enhancement':
statList['untouched'][rowId] = rowCreator
-def post_comments_to_bugzilla(statList, keyInStatList, commentId, comment, changeCommand=""):
+def post_comments_to_bugzilla(statList, keyInStatList, commentId, comment, addFirstLine, changeCommand=""):
for bugId, creator in statList[keyInStatList].items():
bugId = str(bugId)
@@ -114,34 +119,42 @@ def post_comments_to_bugzilla(statList, keyInStatList, commentId, comment, chang
if commentId not in rawData['bugs'][bugId]['comments'][-1]['text']:
- firstLine = "Dear " + creator + ",\\n\\n"
- command = '{"comment" : "' + firstLine + comment.replace('\n', '\\n') + '", "is_private" : false}'
+ if addFirstLine:
+ firstLine = "Dear " + creator + ",\\n\\n"
+ comment = firstLine + comment
+ command = '{"comment" : "' + comment.replace('\n', '\\n') + '", "is_private" : false}'
urlPost = 'https://bugs.documentfoundation.org/rest/bug/' + bugId + '/comment?api_key=' + cfg['configQA']['api-key']
rPost = requests.post(urlPost, command.encode('utf-8'))
print('Bug: ' + bugId + ' - Comment: ' + str(json.loads(rPost.text)['id']))
rPost.close()
- if changeStatus:
+ if changeCommand:
urlPut = 'https://bugs.documentfoundation.org/rest/bug/' + bugId + '?api_key=' + cfg['configQA']['api-key']
rPut = requests.put(urlPut, changeCommand.encode('utf-8'))
- print('Bug: ' + bugId + ' Changed to RESOLVED INSUFFICIENTDATA')
+ print('Bug: ' + bugId + ' - ' + changeCommand)
rPut.close()
+def automated_needInfoToUnconfirmed(statList):
+
+ print('== Move NEEDINFO to UNCONFIRMED ==')
+ command = '{"status" : "UNCONFIRMED"}'
+ post_comments_to_bugzilla(statList, "needInfoToUnconfirmed", 'NeedInfo-To-Unconfirmed', comments.needInfoToUnconfirmedComment, False, command)
+
def automated_needInfoFollowUpPing(statList):
print('== NEEDINFO FollowUp Ping ==')
command = '{"status" : "RESOLVED", "resolution" : "INSUFFICIENTDATA"}'
- post_comments_to_bugzilla(statList, "needInfoFollowUpPing", 'MassPing-NeedInfo-FollowUp', comments.needInfoFollowUpPingComment, command)
+ post_comments_to_bugzilla(statList, "needInfoFollowUpPing", 'MassPing-NeedInfo-FollowUp', comments.needInfoFollowUpPingComment, True, command)
def automated_needInfoPing(statList):
print('== NEEDINFO Ping ==')
- post_comments_to_bugzilla(statList, "needInfoPing", 'MassPing-NeedInfo-Ping', comments.needInfoPingComment)
+ post_comments_to_bugzilla(statList, "needInfoPing", 'MassPing-NeedInfo-Ping', comments.needInfoPingComment, True)
def automated_untouched(statList):
print('== Untouched bugs ==')
- post_comments_to_bugzilla(statList, "untouched", 'MassPing-UntouchedBug', comments.untouchedPingComment)
+ post_comments_to_bugzilla(statList, "untouched", 'MassPing-UntouchedBug', comments.untouchedPingComment, True)
def automated_tagging(statList):
#tags are sometimes not saved in bugzilla_dump.json
@@ -203,3 +216,4 @@ if __name__ == '__main__':
automated_untouched(statList)
automated_needInfoPing(statList)
automated_needInfoFollowUpPing(statList)
+ automated_needInfoToUnconfirmed(statList)
diff --git a/qa/comments.py b/qa/comments.py
index 8222ed4b..62aed5fa 100644
--- a/qa/comments.py
+++ b/qa/comments.py
@@ -3,3 +3,5 @@ untouchedPingComment = "To make sure we're focusing on the bugs that affect our
needInfoPingComment = "This bug has been in NEEDINFO status with no change for at least\n6 months. Please provide the requested information as soon as\npossible and mark the bug as UNCONFIRMED. Due to regular bug\ntracker maintenance, if the bug is still in NEEDINFO status with\nno change in 30 days the QA team will close the bug as INSUFFICIENTDATA\ndue to lack of needed information.\n\nFor more information about our NEEDINFO policy please read the\nwiki located here:\nhttps://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO\n\nIf you have already provided the requested information, please\nmark the bug as UNCONFIRMED so that the QA team knows that the\nbug is ready to be confirmed.\n \nThank you for helping us make LibreOffice even better for everyone!\n\nWarm Regards,\nQA Team\n\nMassPing-NeedInfo-Ping"
needInfoFollowUpPingComment = "Please read this message in its entirety before proceeding.\n\nYour bug report is being closed as INSUFFICIENTDATA due to inactivity and\na lack of information which is needed in order to accurately\nreproduce and confirm the problem. We encourage you to retest\nyour bug against the latest release. If the issue is still\npresent in the latest stable release, we need the following\ninformation (please ignore any that you've already provided):\n\na) Provide details of your system including your operating\n system and the latest version of LibreOffice that you have\n confirmed the bug to be present\n\nb) Provide easy to reproduce steps – the simpler the better\n\nc) Provide any test case(s) which will help us confirm the problem\n\nd) Provide screenshots of the problem if you think it might help\n\ne) Read all comments and provide any requested information\n\nOnce all of this is done, please set the bug back to UNCONFIRMED\nand we will attempt to reproduce the issue. Please do not:\n\na) respond via email \n\nb) update the version field in the bug or any of the other details\n on the top section of our bug tracker\n\nWarm Regards,\nQA Team\n\nMassPing-NeedInfo-FollowUp"
+
+needInfoToUnconfirmedComment = "[Automated Action] NeedInfo-To-Unconfirmed"