Skip to content

Commit

Permalink
Dashboard widget "My last changed tickets": Increased performance of …
Browse files Browse the repository at this point in the history
…database query.
  • Loading branch information
jepf committed Feb 28, 2024
1 parent fb33cbb commit 78a38d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
@@ -1,4 +1,5 @@
# 6.5.7 2024-??-??
- 2024-02-13 Dashboard widget "My last changed tickets": Increased performance of database query.
- 2024-02-27 Fixed a variable for sha512 in Auth::DB. [#379](https://github.com/znuny/Znuny/issues/379)
- 2024-02-22 Fix for generic agent: Scheduled job immediate executed after schedule was changed. Thanks to Paweł Bogusławski (@pboguslawski). [#406](https://github.com/znuny/Znuny/pull/406)
- 2022-02-22 Removed initial insert of `TransportEmailTemplate` in `notification_event_item` table for mention notification and ticket email delivery failure notification. Thanks to Paweł Bogusławski (@pboguslawski). [#397](https://github.com/znuny/Znuny/pull/397)
Expand Down
10 changes: 5 additions & 5 deletions Kernel/Output/HTML/Dashboard/MyLastChangedTickets.pm
Expand Up @@ -89,11 +89,11 @@ sub Run {
my $UserLimit = $Preferences{ $Self->{PrefKeyShown} };
my $Limit = $UserLimit || $Self->{Config}->{Limit} || 10;

my $SQL = 'SELECT ticket_id, MAX(change_time) max_t '
. 'FROM ticket_history '
. 'WHERE change_by = ? '
. 'GROUP BY ticket_id '
. 'ORDER BY max_t desc';
my $SQL = 'SELECT id
FROM ticket
WHERE change_by = ?
ORDER BY change_time DESC
';

return if !$DBObject->Prepare(
SQL => $SQL,
Expand Down

0 comments on commit 78a38d4

Please sign in to comment.