From 888ebed344d3c2fdb8140a3eeaf20f5139375932 Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Thu, 28 Nov 2024 18:50:56 +0100 Subject: added global totals --- zeitgeist.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'zeitgeist.go') diff --git a/zeitgeist.go b/zeitgeist.go index 9dc6e67..a4c05c4 100644 --- a/zeitgeist.go +++ b/zeitgeist.go @@ -888,11 +888,14 @@ type AllTotals struct { func (p *Project) Totals() (at *AllTotals) { at = &AllTotals{ - // TODO: fill in totals here, too WP: make(map[string]*WPTotals), } for n := range p.Workpackages { - at.WP[n], _ = p.TotalWP(n) + t, _ := p.TotalWP(n) + at.WP[n] = t + at.Totals.Budgeted += t.Budgeted + at.Totals.Planned += t.Planned + at.Totals.Done += t.Done } return at } -- cgit v1.2.3