Skip to content

fix(search): Preserve negation on quoted colon-value filters#119789

Merged
mrduncan merged 1 commit into
masterfrom
mrduncan/id-1705-negated-colon-value-filter
Jul 16, 2026
Merged

fix(search): Preserve negation on quoted colon-value filters#119789
mrduncan merged 1 commit into
masterfrom
mrduncan/id-1705-negated-colon-value-filter

Conversation

@mrduncan

Copy link
Copy Markdown
Member

The MutableSearch colon-value special case (which strips quotes from values like user:"id:123" -> user:id:123) rebuilt the token text from the key, operator, and value but omitted the negation. For text filters the leading "!" is stored in the separate negated field, so it was silently dropped.

This surfaced on the Issue Details page, which normalizes the query through MutableSearch: a negated filter such as !message:"gpu::" flipped to the positive message:gpu::, inverting the filter and returning almost no events.

Re-add the negation prefix when rebuilding the text, and guard it with a regression test.

Fixes GH-119703
Refs ID-1705

The MutableSearch colon-value special case (which strips quotes from values
like user:"id:123" -> user:id:123) rebuilt the token text from the key,
operator, and value but omitted the negation. For text filters the leading
"!" is stored in the separate negated field, so it was silently dropped.

This surfaced on the Issue Details page, which normalizes the query through
MutableSearch: a negated filter such as !message:"gpu::" flipped to the
positive message:gpu::, inverting the filter and returning almost no events.

Re-add the negation prefix when rebuilding the text, and guard it with a
regression test.

Fixes GH-119703
Refs ID-1705
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Jul 15, 2026

Copy link
Copy Markdown

ID-1705

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 15, 2026
@mrduncan mrduncan requested review from a team July 15, 2026 23:14
@mrduncan mrduncan marked this pull request as ready for review July 15, 2026 23:14
@mrduncan mrduncan merged commit b6e10be into master Jul 16, 2026
77 checks passed
@mrduncan mrduncan deleted the mrduncan/id-1705-negated-colon-value-filter branch July 16, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Negated text filter with a colon in its value loses its negation on the Issue Details page

2 participants