Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add sort of issue & mr table
  • Loading branch information
kriskbx committed Jan 28, 2018
commit eb33592205620ea9f4fb81da4e6a9e59a0544254
12 changes: 9 additions & 3 deletions src/output/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,22 @@ class base {
totalEstimate += parseInt(issue.stats.time_estimate);
totalSpent += parseInt(issue.stats.total_time_spent);
});

this.report[type].sort((a, b) => {
if (a.iid === b.iid) return 0;

return (a.iid - b.iid) < 0 ? 1 : -1;
});
});

times.sort((a, b) => {

this.times = times;
this.times.sort((a, b) => {
if (a.date.isSame(b.date)) return 0;

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

this.times = times;

this.users = _.mapObject(users, user => this.config.toHumanReadable(user, 'stats'));
this.projects = _.mapObject(projects, project => this.config.toHumanReadable(project, 'stats'));
this.stats = {
Expand Down