File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed
Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,9 @@ var exportCmd = &cobra.Command{
7272 }
7373 return report
7474 },
75+ "AllSelectedProjects" : func () []string {
76+ return projects
77+ },
7578 "AllWorkTypes" : func () []tmetric.Tag {
7679 workTypes , _ := tmetric .GetAllWorkTypes (config , tmetricUser )
7780 return workTypes
Original file line number Diff line number Diff line change @@ -13,11 +13,15 @@ import (
1313)
1414
1515type ReportItem struct {
16- StartTime string `json:"startTime"`
17- EndTime string `json:"endTime"`
18- User string `json:"user"`
19- IssueId string `json:"issueId"`
20- WorkpackageId string
16+ StartTime string `json:"startTime"`
17+ EndTime string `json:"endTime"`
18+ User string `json:"user"`
19+ IssueId string `json:"issueId"`
20+ Project string `json:"project"`
21+ Client string `json:"client"`
22+ Description string `json:"description"`
23+ WorkpackageId string
24+ CalculatedDuration time.Duration
2125}
2226
2327type Report struct {
@@ -122,9 +126,9 @@ func GetDetailedReport(
122126 var report Report
123127 for _ , item := range reportItems {
124128 item .WorkpackageId = strings .Trim (item .IssueId , "#" ) // remove leading '#' from issue id
129+ item .CalculatedDuration , _ = item .getDuration ()
125130 report .ReportItems = append (report .ReportItems , item )
126- itemDuration , _ := item .getDuration ()
127- report .Duration += itemDuration
131+ report .Duration += item .CalculatedDuration
128132 }
129133 return report , nil
130134}
You can’t perform that action at this time.
0 commit comments