Populate indexer search options correctly when filtering for any assignee

This commit is contained in:
Andreas Svanberg 2025-02-24 08:26:25 +01:00
parent 8f6f6306f8
commit 520d29ce34
No known key found for this signature in database
GPG Key ID: 729B051CFFD42F92

View File

@ -47,6 +47,8 @@ func ToSearchOptions(keyword string, opts *issues_model.IssuesOptions) *SearchOp
if opts.AssigneeID.Value() == db.NoConditionID {
searchOpt.AssigneeID = optional.Some[int64](0) // FIXME: this is inconsistent from other places, 0 means "no assignee"
} else if opts.AssigneeID.Value() == db.AnyConditionID {
searchOpt.AnyAssigneeOnly = true
} else if opts.AssigneeID.Value() != 0 {
searchOpt.AssigneeID = opts.AssigneeID
}