Skip to content

Commit eb33592

Browse files
committed
Add sort of issue & mr table
1 parent 1439d32 commit eb33592

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/output/base.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,22 @@ class base {
120120
totalEstimate += parseInt(issue.stats.time_estimate);
121121
totalSpent += parseInt(issue.stats.total_time_spent);
122122
});
123+
124+
this.report[type].sort((a, b) => {
125+
if (a.iid === b.iid) return 0;
126+
127+
return (a.iid - b.iid) < 0 ? 1 : -1;
128+
});
123129
});
124130

125-
times.sort((a, b) => {
131+
132+
this.times = times;
133+
this.times.sort((a, b) => {
126134
if (a.date.isSame(b.date)) return 0;
127135

128136
return a.date.isBefore(b.date) ? 1 : -1;
129137
});
130138

131-
this.times = times;
132-
133139
this.users = _.mapObject(users, user => this.config.toHumanReadable(user, 'stats'));
134140
this.projects = _.mapObject(projects, project => this.config.toHumanReadable(project, 'stats'));
135141
this.stats = {

0 commit comments

Comments
 (0)