mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 04:13:08 +02:00
fix: open tickets count (#500)
Signed-off-by: Vin <28811713+VinDotRun@users.noreply.github.com>
This commit is contained in:
parent
539ed75ddf
commit
b329d5ae2e
@ -65,10 +65,11 @@ module.exports = class extends Listener {
|
||||
firstResponseAt: true,
|
||||
},
|
||||
});
|
||||
const closedTickets = tickets.filter(t => t.firstResponseAt && t.closedAt);
|
||||
const closedTicketsWithResponse = tickets.filter(t => t.firstResponseAt && t.closedAt);
|
||||
const closedTickets = tickets.filter(t => t.closedAt);
|
||||
cached = {
|
||||
avgResolutionTime: ms(getAvgResolutionTime(closedTickets)),
|
||||
avgResponseTime: ms(getAvgResponseTime(closedTickets)),
|
||||
avgResolutionTime: ms(getAvgResolutionTime(closedTicketsWithResponse)),
|
||||
avgResponseTime: ms(getAvgResponseTime(closedTicketsWithResponse)),
|
||||
openTickets: tickets.length - closedTickets.length,
|
||||
totalTickets: tickets.length,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user