mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +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,
|
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 = {
|
cached = {
|
||||||
avgResolutionTime: ms(getAvgResolutionTime(closedTickets)),
|
avgResolutionTime: ms(getAvgResolutionTime(closedTicketsWithResponse)),
|
||||||
avgResponseTime: ms(getAvgResponseTime(closedTickets)),
|
avgResponseTime: ms(getAvgResponseTime(closedTicketsWithResponse)),
|
||||||
openTickets: tickets.length - closedTickets.length,
|
openTickets: tickets.length - closedTickets.length,
|
||||||
totalTickets: tickets.length,
|
totalTickets: tickets.length,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user