[Libreoffice-commits] dev-tools.git: esc-reporting/qa-tools.py
Xisco Fauli
anistenis at gmail.com
Mon Sep 25 18:54:48 UTC 2017
esc-reporting/qa-tools.py | 57 +++++++++++++++++++++++++++++++---------------
1 file changed, 39 insertions(+), 18 deletions(-)
New commits:
commit b70007fe73bb1c17d614793ca0add76f728175eb
Author: Xisco Fauli <anistenis at gmail.com>
Date: Mon Sep 25 20:42:51 2017 +0200
QA tools: Fix cases for add/remove assigned/assignee
diff --git a/esc-reporting/qa-tools.py b/esc-reporting/qa-tools.py
index c91c91f..30eee2d 100755
--- a/esc-reporting/qa-tools.py
+++ b/esc-reporting/qa-tools.py
@@ -359,6 +359,10 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
addAssignedMail = ""
removeAssigned = False
removeAssignedMail = ""
+ addAssignee = False
+ addAssigneeMail = ""
+ removeAssignee = False
+ removeAssigneeMail = ""
backPortAdded = False
backPortAddedMail = ""
bResolved = False
@@ -514,17 +518,20 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
if movedToFixed and removedStatus == 'RESOLVED':
movedToFixed = False
- if actionDate >= cfg[reportPeriod] and actionMail == creatorMail and \
- addedStatus == 'RESOLVED_FIXED' and rowStatus == 'RESOLVED_FIXED' and \
- 'target:' not in row['whiteboard']:
+ if actionDate >= cfg[reportPeriod]:
+ if actionMail == creatorMail and addedStatus == 'RESOLVED_FIXED' and \
+ rowStatus == 'RESOLVED_FIXED' and 'target:' not in row['whiteboard']:
movedToFixed = True
movedToFixedMail = actionMail
- if actionDate >= cfg[reportPeriod] and removedStatus == "ASSIGNED" and \
- addedStatus == "NEW" and rowStatus == "NEW" and \
- row['assigned_to'] != 'libreoffice-bugs at lists.freedesktop.org':
- removeAssigned = True
- removeAssignedMail = actionMail
+ if removedStatus == "ASSIGNED" and addedStatus == "NEW" and \
+ rowStatus == "NEW" and row['assigned_to'] != 'libreoffice-bugs at lists.freedesktop.org':
+ removeAssignee = True
+ removeAssigneeMail = actionMail
+ elif addedStatus == "ASSIGNED" and rowStatus == "ASSIGNED" and \
+ row['assigned_to'] == 'libreoffice-bugs at lists.freedesktop.org':
+ addAssignee = True
+ addAssigneeMail = actionMail
elif change['field_name'] == 'resolution':
if newStatus:
@@ -641,17 +648,19 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
statList['detailedReport']['lists']['system_changed'][newPlatform][1].append(actionMail)
elif change['field_name'] == 'assigned_to':
- removedAssignee = change['removed']
- addedAssignee = change['added']
-
- if addAssigned and addedAssignee == "libreoffice-bugs at lists.freedesktop.org":
- addAssigned = False
-
- if actionDate >= cfg[reportPeriod] and removedAssignee == "libreoffice-bugs at lists.freedesktop.org" and \
- row['assigned_to'] != 'libreoffice-bugs at lists.freedesktop.org' and \
- ( rowStatus == 'NEW' or rowStatus == 'UNCONFIRMED' or rowStatus == 'REOPENED'):
+ if actionDate >= cfg[reportPeriod]:
+ removedAssignee = change['removed']
+ addedAssignee = change['added']
+ if removedAssignee == "libreoffice-bugs at lists.freedesktop.org" and \
+ row['assigned_to'] != 'libreoffice-bugs at lists.freedesktop.org' and \
+ ( rowStatus == 'NEW' or rowStatus == 'UNCONFIRMED'):
addAssigned = True
addAssignedMail = actionMail
+ if addedAssignee == "libreoffice-bugs at lists.freedesktop.org" and \
+ row['assigned_to'] == 'libreoffice-bugs at lists.freedesktop.org' and \
+ rowStatus == 'ASSIGNED':
+ removeAssigned = True
+ removeAssignedMail = actionMail
commentMail = None
comments = row['comments'][1:]
@@ -728,7 +737,7 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
#In case the reporter assigned the bug to himself at creation time
if addAssigned or (creationDate >= cfg[reportPeriod] and row['assigned_to'] != 'libreoffice-bugs at lists.freedesktop.org' and \
- ( rowStatus == 'NEW' or rowStatus == 'UNCONFIRMED' or rowStatus == 'REOPENED')):
+ (rowStatus == 'NEW' or rowStatus == 'UNCONFIRMED')):
if 'addAssigned' not in lResults:
lResults['addAssigned'] = [[],[]]
lResults['addAssigned'][0].append(rowId)
@@ -740,6 +749,18 @@ def analyze_bugzilla(statList, bugzillaData, cfg, lIgnore):
lResults['removeAssigned'][0].append(rowId)
lResults['removeAssigned'][1].append(removeAssignedMail)
+ if addAssignee:
+ if 'addAssignee' not in lResults:
+ lResults['addAssignee'] =[[],[]]
+ lResults['addAssignee'][0].append(rowId)
+ lResults['addAssignee'][1].append(addAssigneeMail)
+
+ if removeAssignee:
+ if 'removeAssignee' not in lResults:
+ lResults['removeAssignee'] =[[],[]]
+ lResults['removeAssignee'][0].append(rowId)
+ lResults['removeAssignee'][1].append(removeAssigneeMail)
+
if backPortAdded:
if 'backPortAdded' not in lResults:
lResults['backPortAdded'] = [[],[]]
More information about the Libreoffice-commits
mailing list