From 87951bdaaa601a305b225e44b39782613b4bd877 Mon Sep 17 00:00:00 2001 From: anhefti Date: Mon, 1 Feb 2021 09:20:32 +0100 Subject: [PATCH] fixed sort in User Activity Logs for User column --- .../ch/ethz/seb/sebserver/gui/content/UserActivityLogs.java | 1 + .../webservice/servicelayer/PaginationServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/UserActivityLogs.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/UserActivityLogs.java index 70e43a5a..766d5837 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/UserActivityLogs.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/UserActivityLogs.java @@ -196,6 +196,7 @@ public class UserActivityLogs implements TemplateComposer { UserActivityLog.ATTR_USER_NAME, USER_TEXT_KEY, UserActivityLog::getUsername) + .sortable() .withFilter(this.userNameFilter)) .withColumn(new ColumnDefinition( diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/PaginationServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/PaginationServiceImpl.java index 57d23fa6..372f9f9a 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/PaginationServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/PaginationServiceImpl.java @@ -306,8 +306,8 @@ public class PaginationServiceImpl implements PaginationService { // User Activity Log Table final Map userActivityLogTableMap = new HashMap<>(); userActivityLogTableMap.put( - Domain.USER_ACTIVITY_LOG.ATTR_USER_UUID, - UserActivityLogRecordDynamicSqlSupport.userUuid.name()); + Domain.USER.ATTR_USERNAME, + UserRecordDynamicSqlSupport.username.name()); userActivityLogTableMap.put( Domain.USER_ACTIVITY_LOG.ATTR_ACTIVITY_TYPE, UserActivityLogRecordDynamicSqlSupport.activityType.name());