-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
fix(issues): Escape status tag on search #89434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {escapeIssueTagKey} from './utils'; | ||
|
||
describe('escapeIssueTagKey', () => { | ||
it('should escape conflicting tag keys', () => { | ||
expect(escapeIssueTagKey('status')).toBe('tags[status]'); | ||
expect(escapeIssueTagKey('message')).toBe('tags[message]'); | ||
}); | ||
|
||
it('should not escape environment and project', () => { | ||
expect(escapeIssueTagKey('environment')).toBe('environment'); | ||
expect(escapeIssueTagKey('project')).toBe('project'); | ||
}); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,6 +106,7 @@ export enum FieldKey { | |
STACK_PACKAGE = 'stack.package', | ||
STACK_RESOURCE = 'stack.resource', | ||
STACK_STACK_LEVEL = 'stack.stack_level', | ||
STATUS = 'status', | ||
TIMESTAMP = 'timestamp', | ||
TIMESTAMP_TO_DAY = 'timestamp.to_day', | ||
TIMESTAMP_TO_HOUR = 'timestamp.to_hour', | ||
|
@@ -1703,6 +1704,11 @@ const EVENT_FIELD_DEFINITIONS: Record<AllEventFieldKeys, FieldDefinition> = { | |
kind: FieldKind.FIELD, | ||
valueType: FieldValueType.NUMBER, | ||
}, | ||
[FieldKey.STATUS]: { | ||
desc: t('Status of the issue'), | ||
kind: FieldKind.FIELD, | ||
valueType: FieldValueType.STRING, | ||
}, | ||
[FieldKey.TIMES_SEEN]: { | ||
desc: t('Total number of events'), | ||
kind: FieldKind.FIELD, | ||
|
@@ -1993,6 +1999,7 @@ export const ISSUE_EVENT_FIELDS_THAT_MAY_CONFLICT_WITH_TAGS: Set<FieldKey> = new | |
FieldKey.STACK_MODULE, | ||
FieldKey.STACK_PACKAGE, | ||
FieldKey.STACK_STACK_LEVEL, | ||
FieldKey.STATUS, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @malwilley i wasn't totally sure about this change and how these are used already There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah this is exactly what this was set was meant to solve so it belongs here |
||
FieldKey.TIMESTAMP, | ||
FieldKey.TITLE, | ||
FieldKey.TRACE, | ||
|
Unchanged files with check annotations Beta
SpanIndexedResponse, | ||
} from 'sentry/views/insights/types'; | ||
import {useInsightsEap} from '../../common/utils/useEap'; | ||
interface UseSpanSamplesOptions<Fields> { | ||
enabled?: boolean; |
isMissingInstrumentationNode, | ||
isSpanNode, | ||
isTraceErrorNode, | ||
isTraceNode, | ||
isTransactionNode, | ||
} from 'sentry/views/performance/newTraceDetails/traceGuards'; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are doing this same thing in
useFetchIssueTags.tsx
, can you use this function there as well?