feat(activity): add --by-activity flag to break down spent time by activity type
- Load time entry activity names from Redmine enumeration. - Aggregate hours per issue and per activity in fetch_issues_with_spent_time. - Add --by-activity CLI flag and propagate it through report builder, summary, and all formatters (console, CSV, HTML, JSON, ODT). - Keep backward-compatible 2-tuple input in build_grouped_report. - Bump version to 1.8.0. Closes #41
This commit is contained in:
@@ -27,6 +27,7 @@ class CSVFormatter(Formatter):
|
||||
headers.append("Spent Time")
|
||||
writer.writerow(headers)
|
||||
for r in rows:
|
||||
time_text = r["time_text"].replace("\n", " / ")
|
||||
data = [
|
||||
r["project"],
|
||||
r["version"],
|
||||
@@ -35,7 +36,7 @@ class CSVFormatter(Formatter):
|
||||
r["status_ru"],
|
||||
]
|
||||
if not self.no_time:
|
||||
data.append(r["time_text"])
|
||||
data.append(time_text)
|
||||
writer.writerow(data)
|
||||
return output.getvalue()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user