aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2023-12-03 12:22:44 +0100
committerGitHub <noreply@github.com>2023-12-03 12:22:44 +0100
commitbffbf08f26656c2c073da2a989f3abc38fdbb444 (patch)
tree8bc60d352cba17c148b029070a1c722c2b9ab282
parent6ad145f5bd5fc2d32a5b829a708e0f9038191c63 (diff)
downloadgitea-bffbf08f26656c2c073da2a989f3abc38fdbb444.tar.gz
gitea-bffbf08f26656c2c073da2a989f3abc38fdbb444.zip
Fix missing issue search index update when changing status (#28325)
Changing an issue status, assignee, labels or milestone without also adding a comment would not update the index, resulting in wrong search results.
-rw-r--r--services/indexer/notify.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/services/indexer/notify.go b/services/indexer/notify.go
index e0b87faedb..f1e21a2d40 100644
--- a/services/indexer/notify.go
+++ b/services/indexer/notify.go
@@ -130,3 +130,25 @@ func (r *indexerNotifier) IssueChangeTitle(ctx context.Context, doer *user_model
func (r *indexerNotifier) IssueChangeRef(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldRef string) {
issue_indexer.UpdateIssueIndexer(ctx, issue.ID)
}
+
+func (r *indexerNotifier) IssueChangeStatus(ctx context.Context, doer *user_model.User, commitID string, issue *issues_model.Issue, actionComment *issues_model.Comment, closeOrReopen bool) {
+ issue_indexer.UpdateIssueIndexer(ctx, issue.ID)
+}
+
+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) {
+ issue_indexer.UpdateIssueIndexer(ctx, issue.ID)
+}
+
+func (r *indexerNotifier) IssueChangeMilestone(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldMilestoneID int64) {
+ issue_indexer.UpdateIssueIndexer(ctx, issue.ID)
+}
+
+func (r *indexerNotifier) IssueChangeLabels(ctx context.Context, doer *user_model.User, issue *issues_model.Issue,
+ addedLabels, removedLabels []*issues_model.Label,
+) {
+ issue_indexer.UpdateIssueIndexer(ctx, issue.ID)
+}
+
+func (r *indexerNotifier) IssueClearLabels(ctx context.Context, doer *user_model.User, issue *issues_model.Issue) {
+ issue_indexer.UpdateIssueIndexer(ctx, issue.ID)
+}