Commit 99447f22 authored by Thomas Lotze's avatar Thomas Lotze

re #10: distinguish projects by full path in report, display with namespace

parent 2c1b08be
......@@ -11,7 +11,8 @@ def report(entries):
totals_by_project = defaultdict(float)
totals_by_item = defaultdict(float)
for entry in entries:
project = entry['project'].name
project = entry['project']
project = (project.path_with_namespace, project)
item = entry['item']
item = ([ProjectIssue, ProjectMergeRequest].index(type(item)),
......@@ -23,8 +24,9 @@ def report(entries):
total = sum(totals_by_project.values())
for project, times_by_item in sorted(times.items()):
print('{}: {:.2f}'.format(project, totals_by_project[project]))
for (_, project), times_by_item in sorted(times.items()):
print('{}: {:.2f}'.format(
project.name_with_namespace, totals_by_project[project]))
for (_, _, item), times_by_author in sorted(times_by_item.items()):
print('{}{}: {:.2f} ({})'.format(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment