Skip to content

Commit 2e97000

Browse files
committed
Remove prefiltering of issues/mrs by updated_at timestamp
1 parent 9a1cbb8 commit 2e97000

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

models/report.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff 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));

0 commit comments

Comments
 (0)