Skip to content

Commit 1f43f8a

Browse files
committed
Fix search empty issue
1 parent e75c510 commit 1f43f8a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

routers/web/repo/issue_list.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@ func prepareIssueFilterAndList(ctx *context.Context, milestoneID, projectID int6
542542
RepoIDs: []int64{repo.ID},
543543
LabelIDs: preparedLabelFilter.SelectedLabelIDs,
544544
MilestoneIDs: mileIDs,
545-
ProjectIDs: []int64{projectID},
546545
AssigneeID: assigneeID,
547546
MentionedID: mentionedID,
548547
PosterID: posterUserID,
@@ -551,6 +550,11 @@ func prepareIssueFilterAndList(ctx *context.Context, milestoneID, projectID int6
551550
IsPull: isPullOption,
552551
IssueIDs: nil,
553552
}
553+
554+
if projectID > 0 {
555+
statsOpts.ProjectIDs = []int64{projectID}
556+
}
557+
554558
if keyword != "" {
555559
keywordMatchedIssueIDs, _, err = issue_indexer.SearchIssues(ctx, issue_indexer.ToSearchOptions(keyword, statsOpts))
556560
if err != nil {

0 commit comments

Comments
 (0)