fix(assignees): use db.ILIKE helper for assignee search count query

This commit is contained in:
Tink bot 2026-05-26 19:34:41 +00:00 committed by kolaente
parent b6a02cb6a5
commit b8cabcd825
1 changed files with 4 additions and 1 deletions

View File

@ -335,7 +335,10 @@ func (la *TaskAssginee) ReadAll(s *xorm.Session, a web.Auth, search string, page
numberOfTotalItems, err = s.Table("task_assignees").
Join("INNER", "users", "task_assignees.user_id = users.id").
Where("task_id = ? AND users.username LIKE ?", la.TaskID, "%"+search+"%").
Where(builder.And(
builder.Eq{"task_id": la.TaskID},
db.ILIKE("users.username", search),
)).
Count(&TaskAssginee{})
return taskAssignees, len(taskAssignees), numberOfTotalItems, err
}