Skip to content

Commit 9b1aebb

Browse files
authored
feat(issues): add subtitles for common search filters (#96382)
1 parent 2ca9b7b commit 9b1aebb

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

static/app/utils/fields/index.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,34 @@ export enum IsFieldValues {
403403
UNLINKED = 'unlinked',
404404
}
405405

406+
const IsFieldDescriptions: Record<IsFieldValues, string> = {
407+
[IsFieldValues.RESOLVED]: t('Issues marked as fixed'),
408+
[IsFieldValues.UNRESOLVED]: t('Issues still active and needing attention'),
409+
[IsFieldValues.ARCHIVED]: t('Issues that have been archived'),
410+
[IsFieldValues.ESCALATING]: t(
411+
'Issues occurring significantly more often than they used to'
412+
),
413+
[IsFieldValues.NEW]: t('Issues that first occurred in the last 7 days'),
414+
[IsFieldValues.ONGOING]: t(
415+
'Issues created more than 7 days ago or manually been marked as reviewed'
416+
),
417+
[IsFieldValues.REGRESSED]: t('Issues resolved then occurred again'),
418+
[IsFieldValues.ASSIGNED]: t('Issues assigned to a team member'),
419+
[IsFieldValues.UNASSIGNED]: t('Issues not assigned to anyone'),
420+
[IsFieldValues.FOR_REVIEW]: t('Issues pending review'),
421+
[IsFieldValues.LINKED]: t('Issues linked to other issues'),
422+
[IsFieldValues.UNLINKED]: t('Issues not linked to other issues'),
423+
};
424+
425+
export function getIsFieldDescriptionFromValue(
426+
isFieldValue: IsFieldValues
427+
): string | undefined {
428+
if (isFieldValue in IsFieldDescriptions) {
429+
return IsFieldDescriptions[isFieldValue];
430+
}
431+
return undefined;
432+
}
433+
406434
type AggregateColumnParameter = {
407435
/**
408436
* The types of columns that are valid for this parameter.
@@ -1645,6 +1673,7 @@ const ERROR_FIELD_DEFINITION: Record<ErrorFieldKey, FieldDefinition> = {
16451673
valueType: FieldValueType.STRING,
16461674
defaultValue: 'unresolved',
16471675
allowWildcard: false,
1676+
values: Object.values(IsFieldValues),
16481677
},
16491678
[FieldKey.ISSUE]: {
16501679
desc: t('The issue identification short code'),

static/app/views/issueList/utils/useFetchIssueTags.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {SEMVER_TAGS} from 'sentry/utils/discover/fields';
2323
import {
2424
FieldKey,
2525
FieldKind,
26+
getIsFieldDescriptionFromValue,
2627
IsFieldValues,
2728
ISSUE_EVENT_PROPERTY_FIELDS,
2829
ISSUE_FIELDS,
@@ -254,7 +255,15 @@ function builtInIssuesFields({
254255
...PREDEFINED_FIELDS[FieldKey.IS],
255256
key: FieldKey.IS,
256257
name: 'Status',
257-
values: Object.values(IsFieldValues),
258+
values: Object.values(IsFieldValues).map(value => ({
259+
icon: null,
260+
title: value,
261+
name: value,
262+
documentation: getIsFieldDescriptionFromValue(value),
263+
value,
264+
type: ItemType.TAG_VALUE,
265+
children: [],
266+
})),
258267
maxSuggestedValues: Object.values(IsFieldValues).length,
259268
predefined: true,
260269
},

0 commit comments

Comments
 (0)