@@ -113,6 +113,8 @@ class base {
113113 let projects = { } ;
114114 let times = [ ] ;
115115 let timesWarnings = [ ] ;
116+ let days = { } ;
117+ let daysMoment = { } ;
116118
117119 let spentFreeLabels = this . config . get ( 'freeLabels' ) ;
118120 if ( undefined === spentFreeLabels ) {
@@ -122,11 +124,20 @@ class base {
122124 [ 'issues' , 'mergeRequests' ] . forEach ( type => {
123125 this . report [ type ] . forEach ( issue => {
124126 issue . times . forEach ( time => {
127+ let dateGrp = time . date . format ( this . config . get ( 'dateFormatGroupReport' ) ) ;
125128 if ( ! users [ time . user ] ) users [ time . user ] = 0 ;
126129 if ( ! projects [ time . project_namespace ] ) projects [ time . project_namespace ] = 0 ;
130+ if ( ! days [ dateGrp ] ) {
131+ days [ dateGrp ] = { }
132+ daysMoment [ dateGrp ] = time . date ;
133+ } ;
134+ if ( ! days [ dateGrp ] [ time . iid ] ) {
135+ days [ dateGrp ] [ time . iid ] = 0 ;
136+ }
127137
128138 users [ time . user ] += time . seconds ;
129139 projects [ time . project_namespace ] += time . seconds ;
140+ days [ dateGrp ] [ time . iid ] += time . seconds ;
130141
131142 spent += time . seconds ;
132143 //if(time.parent.labels)
@@ -162,6 +173,8 @@ class base {
162173 return a . date . isBefore ( b . date ) ? 1 : - 1 ;
163174 } ) ;
164175
176+ this . days = days ;
177+ this . daysMoment = daysMoment ;
165178 this . users = _ . mapObject ( users , user => this . config . toHumanReadable ( user , 'stats' ) ) ;
166179 this . projects = _ . mapObject ( projects , project => this . config . toHumanReadable ( project , 'stats' ) ) ;
167180 this . stats = {
0 commit comments