Skip to content

Commit 8c8c24f

Browse files
GiteaBotbrechtvl
andauthored
Fix missing issue search index update when changing status (#28325) (#28330)
Backport #28325 by @brechtvl Changing an issue status, assignee, labels or milestone without also adding a comment would not update the index, resulting in wrong search results. Co-authored-by: Brecht Van Lommel <[email protected]>
1 parent fee9c05 commit 8c8c24f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

services/indexer/notify.go

+22
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,25 @@ func (r *indexerNotifier) IssueChangeTitle(ctx context.Context, doer *user_model
130130
func (r *indexerNotifier) IssueChangeRef(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldRef string) {
131131
issue_indexer.UpdateIssueIndexer(ctx, issue.ID)
132132
}
133+
134+
func (r *indexerNotifier) IssueChangeStatus(ctx context.Context, doer *user_model.User, commitID string, issue *issues_model.Issue, actionComment *issues_model.Comment, closeOrReopen bool) {
135+
issue_indexer.UpdateIssueIndexer(ctx, issue.ID)
136+
}
137+
138+
func (r *indexerNotifier) IssueChangeAssignee(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, assignee *user_model.User, removed bool, comment *issues_model.Comment) {
139+
issue_indexer.UpdateIssueIndexer(ctx, issue.ID)
140+
}
141+
142+
func (r *indexerNotifier) IssueChangeMilestone(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldMilestoneID int64) {
143+
issue_indexer.UpdateIssueIndexer(ctx, issue.ID)
144+
}
145+
146+
func (r *indexerNotifier) IssueChangeLabels(ctx context.Context, doer *user_model.User, issue *issues_model.Issue,
147+
addedLabels, removedLabels []*issues_model.Label,
148+
) {
149+
issue_indexer.UpdateIssueIndexer(ctx, issue.ID)
150+
}
151+
152+
func (r *indexerNotifier) IssueClearLabels(ctx context.Context, doer *user_model.User, issue *issues_model.Issue) {
153+
issue_indexer.UpdateIssueIndexer(ctx, issue.ID)
154+
}

0 commit comments

Comments
 (0)