fix(comments): make sure comment sort order is stable

Resolves https://community.vikunja.io/t/comment-order-is-not-by-time/1147/3?u=kolaente
This commit is contained in:
kolaente 2023-08-29 14:09:53 +02:00
parent 6f825fa413
commit 5392ca788c
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 2 additions and 1 deletions

View File

@ -243,7 +243,8 @@ func (tc *TaskComment) ReadAll(s *xorm.Session, auth web.Auth, search string, pa
builder.Eq{"task_id": tc.TaskID},
db.ILIKE("comment", search),
)).
Join("LEFT", "users", "users.id = task_comments.author_id")
Join("LEFT", "users", "users.id = task_comments.author_id").
OrderBy("id", "asc")
if limit > 0 {
query = query.Limit(limit, start)
}