0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-20 23:28:28 +02:00

Fix search empty issue

This commit is contained in:
Tyrone Yeh 2025-05-07 14:55:42 +08:00
parent e75c510cb2
commit 1f43f8a566
No known key found for this signature in database
GPG Key ID: AC8B5AA00375E170

View File

@ -542,7 +542,6 @@ func prepareIssueFilterAndList(ctx *context.Context, milestoneID, projectID int6
RepoIDs: []int64{repo.ID},
LabelIDs: preparedLabelFilter.SelectedLabelIDs,
MilestoneIDs: mileIDs,
ProjectIDs: []int64{projectID},
AssigneeID: assigneeID,
MentionedID: mentionedID,
PosterID: posterUserID,
@ -551,6 +550,11 @@ func prepareIssueFilterAndList(ctx *context.Context, milestoneID, projectID int6
IsPull: isPullOption,
IssueIDs: nil,
}
if projectID > 0 {
statsOpts.ProjectIDs = []int64{projectID}
}
if keyword != "" {
keywordMatchedIssueIDs, _, err = issue_indexer.SearchIssues(ctx, issue_indexer.ToSearchOptions(keyword, statsOpts))
if err != nil {