Do not calculate WIP as -1 mark
The fix corrects contribution report and contribution summary block Closes bug 1352881 Change-Id: Ic31f4add2fd1370cf2c2014f9038a7b31ce435e4
This commit is contained in:
@@ -222,11 +222,16 @@ def loc_filter(result, record, param_id, context):
|
||||
|
||||
def mark_filter(result, record, param_id, context):
|
||||
result_by_param = result[getattr(record, param_id)]
|
||||
if record.type == 'Workflow' and record.value == 1:
|
||||
value = 'A'
|
||||
else:
|
||||
value = record.value
|
||||
value = record.value
|
||||
record_type = record.type
|
||||
|
||||
if record_type == 'Code-Review':
|
||||
result_by_param['metric'] += 1
|
||||
elif record.type == 'Workflow':
|
||||
if value == 1:
|
||||
value = 'A'
|
||||
else:
|
||||
value = 'WIP'
|
||||
result_by_param[value] = result_by_param.get(value, 0) + 1
|
||||
|
||||
if record.disagreement:
|
||||
|
||||
@@ -165,7 +165,7 @@ def get_activity(records, start_record, page_size, query_message=None):
|
||||
|
||||
|
||||
def get_contribution_summary(records):
|
||||
marks = dict((m, 0) for m in [-2, -1, 0, 1, 2, 'A'])
|
||||
marks = dict((m, 0) for m in [-2, -1, 0, 1, 2, 'A', 'WIP'])
|
||||
commit_count = 0
|
||||
loc = 0
|
||||
drafted_blueprint_count = 0
|
||||
@@ -182,10 +182,13 @@ def get_contribution_summary(records):
|
||||
commit_count += 1
|
||||
loc += record.loc
|
||||
elif record_type == 'mark':
|
||||
if record.type == 'Workflow' and record.value == 1:
|
||||
marks['A'] += 1
|
||||
else:
|
||||
marks[record.value] += 1
|
||||
value = record.value
|
||||
if record.type == 'Workflow':
|
||||
if value == 1:
|
||||
value = 'A'
|
||||
else:
|
||||
value = 'WIP'
|
||||
marks[value] += 1
|
||||
elif record_type == 'email':
|
||||
email_count += 1
|
||||
elif record_type == 'bpd':
|
||||
|
||||
Reference in New Issue
Block a user