File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -114,26 +114,29 @@ class report extends Base {
114114 process ( input , model , advance = false ) {
115115 let collect = [ ] ;
116116
117- let promise = this . parallel ( this [ input ] , ( item , done ) => {
118- // filter out things that are too old
119- if ( ! this . config . get ( 'showWithoutTimes' ) && moment ( item . updated_at ) . isBefore ( this . config . get ( 'from' ) ) ) {
120- if ( advance ) advance ( ) ;
121- return done ( ) ;
122- }
117+ let promise = this . parallel ( this [ input ] , ( data , done ) => {
123118
124- // collect items, query times & stats
125- collect . push ( item = new model ( this . config , item ) ) ;
119+ let item = new model ( this . config , data ) ;
126120 item . project_namespace = this . projects [ item . project_id ] ;
127121
128122 item . getNotes ( )
129123 . then ( ( ) => item . getTimes ( ) )
130124 . catch ( error => done ( error ) )
125+ . catch ( error => done ( error ) )
131126 . then ( ( ) => item . getStats ( ) )
132127 . catch ( error => done ( error ) )
133128 . then ( ( ) => {
129+ if ( this . config . get ( 'showWithoutTimes' ) || item . times . length > 0 ) {
130+ collect . push ( item ) ;
131+ }
132+
134133 if ( advance ) advance ( ) ;
135- done ( ) ;
134+ return done ( ) ;
136135 } ) ;
136+
137+
138+ // collect items, query times & stats
139+ collect . push ( ) ;
137140 } ) ;
138141
139142 promise . then ( ( ) => this [ input ] = this . filter ( collect ) ) ;
You can’t perform that action at this time.
0 commit comments