# HG changeset patch # User Mike Becker # Date 1736878908 -3600 # Node ID 7280393d1fa7f522a9b6c1c5936e8f6d6b34aad9 # Parent 5fa3e40d0de037f4ba95244e62962b7b237b5168 fix currentAssignee filter not used for comments diff -r 5fa3e40d0de0 -r 7280393d1fa7 src/main/kotlin/de/uapcore/lightpit/entities/IssueHistoryEntry.kt --- a/src/main/kotlin/de/uapcore/lightpit/entities/IssueHistoryEntry.kt Mon Jan 13 21:38:06 2025 +0100 +++ b/src/main/kotlin/de/uapcore/lightpit/entities/IssueHistoryEntry.kt Tue Jan 14 19:21:48 2025 +0100 @@ -36,6 +36,9 @@ val subject: String, val time: Timestamp, val type: IssueHistoryType, + /** + * Used for filtering issue entries based on current assignment. + */ val currentAssignee: String?, val issueid: Int, val component: String, @@ -52,6 +55,9 @@ val subject: String, val time: Timestamp, val type: IssueHistoryType, + /** + * Unused at the moment, but might be used in the future to filter comments. + */ val currentAssignee: String?, val issueid: Int, val commentid: Int, diff -r 5fa3e40d0de0 -r 7280393d1fa7 src/main/kotlin/de/uapcore/lightpit/servlet/FeedServlet.kt --- a/src/main/kotlin/de/uapcore/lightpit/servlet/FeedServlet.kt Mon Jan 13 21:38:06 2025 +0100 +++ b/src/main/kotlin/de/uapcore/lightpit/servlet/FeedServlet.kt Tue Jan 14 19:21:48 2025 +0100 @@ -185,11 +185,14 @@ issuesFromDb.filter { assignees.contains(it.currentAssignee) } val commentsFromDb = dao.listIssueCommentHistory(project, days) - val commentHistory = when (comments) { + var commentHistory = when (comments) { "all" -> commentsFromDb "new" -> commentsFromDb.filter { it.type == IssueHistoryType.NewComment } else -> emptyList() } + if (assignees != null) { + commentHistory = commentHistory.filter { assignees.contains(it.currentAssignee) } + } http.view = IssueFeed(project, generateFeedEntries(http, issueHistory, commentHistory)) http.renderFeed("issues-feed")