diff --git a/stackalytics/dashboard/decorators.py b/stackalytics/dashboard/decorators.py index fe0cf5529..6fc578981 100644 --- a/stackalytics/dashboard/decorators.py +++ b/stackalytics/dashboard/decorators.py @@ -247,6 +247,9 @@ def mark_filter(result, record, param_id, context): if record_type == 'Code-Review': result_by_param['metric'] += 1 value = record.value + elif record_type == 'Abandon': + result_by_param['metric'] += 1 + value = 'x' elif record.type == 'Workflow': if record.value == 1: value = 'A' @@ -265,7 +268,7 @@ def mark_finalize(record): positive = 0 numeric = 0 mark_distribution = [] - for key in [-2, -1, 1, 2, 'A']: + for key in [-2, -1, 1, 2, 'A', 'x']: if key in record: if key in [1, 2]: positive += record[key] diff --git a/stackalytics/dashboard/helpers.py b/stackalytics/dashboard/helpers.py index 01bac7021..48ed70ae8 100644 --- a/stackalytics/dashboard/helpers.py +++ b/stackalytics/dashboard/helpers.py @@ -182,7 +182,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', 'WIP']) + marks = dict((m, 0) for m in [-2, -1, 0, 1, 2, 'A', 'WIP', 'x', 's']) commit_count = 0 loc = 0 drafted_blueprint_count = 0 @@ -208,6 +208,10 @@ def get_contribution_summary(records): value = 'WIP' elif record.type == 'Code-Review': value = record.value + elif record.type == 'Abandon': + value = 'x' + elif record.type[:5] == 'Self-': + value = 's' marks[value] += 1 elif record_type == 'email': email_count += 1 diff --git a/stackalytics/dashboard/templates/_macros/activity_log.html b/stackalytics/dashboard/templates/_macros/activity_log.html index f82626da9..f04b6aa35 100644 --- a/stackalytics/dashboard/templates/_macros/activity_log.html +++ b/stackalytics/dashboard/templates/_macros/activity_log.html @@ -106,11 +106,13 @@ show_record_type=True, show_user_gravatar=True, gravatar_size=32, show_all=True)