diff --git a/static/app/components/stream/group.tsx b/static/app/components/stream/group.tsx index 1268f8cb11862c..be1798fe798fb4 100644 --- a/static/app/components/stream/group.tsx +++ b/static/app/components/stream/group.tsx @@ -410,6 +410,7 @@ function BaseGroupRow({ [IssueCategory.CRON]: t('Cron Events'), [IssueCategory.REPLAY]: t('Replay Events'), [IssueCategory.UPTIME]: t('Uptime Events'), + [IssueCategory.METRIC_ALERT]: t('Metric Alert Events'), }; const groupCount = !defined(primaryCount) ? ( diff --git a/static/app/types/group.tsx b/static/app/types/group.tsx index 9f48379828e1cd..b63a20f70b5651 100644 --- a/static/app/types/group.tsx +++ b/static/app/types/group.tsx @@ -67,6 +67,7 @@ export enum IssueCategory { CRON = 'cron', REPLAY = 'replay', UPTIME = 'uptime', + METRIC_ALERT = 'metric_alert', } export enum IssueType { diff --git a/static/app/utils/issueTypeConfig/cronConfig.tsx b/static/app/utils/issueTypeConfig/cronConfig.tsx index a498e27e571475..4062e049ea83d5 100644 --- a/static/app/utils/issueTypeConfig/cronConfig.tsx +++ b/static/app/utils/issueTypeConfig/cronConfig.tsx @@ -18,6 +18,7 @@ const cronConfig: IssueCategoryConfigMapping = { disabledReason: t('Not yet supported for cron issues'), }, ignore: {enabled: true}, + resolve: {enabled: true}, resolveInRelease: {enabled: true}, share: {enabled: true}, }, diff --git a/static/app/utils/issueTypeConfig/errorConfig.tsx b/static/app/utils/issueTypeConfig/errorConfig.tsx index e9ff527557ded7..f52d7e05fe7f07 100644 --- a/static/app/utils/issueTypeConfig/errorConfig.tsx +++ b/static/app/utils/issueTypeConfig/errorConfig.tsx @@ -17,6 +17,7 @@ export const errorConfig: IssueCategoryConfigMapping = { deleteAndDiscard: {enabled: true}, ignore: {enabled: true}, merge: {enabled: true}, + resolve: {enabled: true}, resolveInRelease: {enabled: true}, share: {enabled: true}, }, diff --git a/static/app/utils/issueTypeConfig/index.tsx b/static/app/utils/issueTypeConfig/index.tsx index 063fddb4dc214d..cfd0f3a16ea2d7 100644 --- a/static/app/utils/issueTypeConfig/index.tsx +++ b/static/app/utils/issueTypeConfig/index.tsx @@ -6,6 +6,7 @@ import { errorConfig, getErrorHelpResource, } from 'sentry/utils/issueTypeConfig/errorConfig'; +import metricIssueConfig from 'sentry/utils/issueTypeConfig/metricIssueConfig'; import performanceConfig from 'sentry/utils/issueTypeConfig/performanceConfig'; import replayConfig from 'sentry/utils/issueTypeConfig/replayConfig'; import type { @@ -31,9 +32,13 @@ const BASE_CONFIG: IssueTypeConfig = { deleteAndDiscard: {enabled: false}, merge: {enabled: false}, ignore: {enabled: false}, + resolve: {enabled: true}, resolveInRelease: {enabled: true}, share: {enabled: false}, }, + customCopy: { + resolution: 'Resolved', + }, attachments: {enabled: false}, autofix: false, events: {enabled: true}, @@ -64,6 +69,7 @@ const issueTypeConfig: Config = { [IssueCategory.CRON]: cronConfig, [IssueCategory.REPLAY]: replayConfig, [IssueCategory.UPTIME]: uptimeConfig, + [IssueCategory.METRIC_ALERT]: metricIssueConfig, }; /** diff --git a/static/app/utils/issueTypeConfig/metricIssueConfig.tsx b/static/app/utils/issueTypeConfig/metricIssueConfig.tsx new file mode 100644 index 00000000000000..72a346849a441a --- /dev/null +++ b/static/app/utils/issueTypeConfig/metricIssueConfig.tsx @@ -0,0 +1,34 @@ +import {t} from 'sentry/locale'; +import type {IssueCategoryConfigMapping} from 'sentry/utils/issueTypeConfig/types'; + +const metricIssueConfig: IssueCategoryConfigMapping = { + _categoryDefaults: { + actions: { + archiveUntilOccurrence: {enabled: false}, + delete: {enabled: false}, + deleteAndDiscard: {enabled: false}, + merge: {enabled: false}, + ignore: {enabled: true}, + resolve: {enabled: false}, + resolveInRelease: {enabled: false}, + share: {enabled: true}, + }, + customCopy: { + resolution: t('Back to baseline'), + }, + attachments: {enabled: false}, + resources: null, + autofix: false, + events: {enabled: false}, + mergedIssues: {enabled: false}, + replays: {enabled: false}, + similarIssues: {enabled: false}, + userFeedback: {enabled: false}, + usesIssuePlatform: true, + stats: {enabled: false}, + tagsTab: {enabled: false}, + issueSummary: {enabled: false}, + }, +}; + +export default metricIssueConfig; diff --git a/static/app/utils/issueTypeConfig/performanceConfig.tsx b/static/app/utils/issueTypeConfig/performanceConfig.tsx index 7060e1a897eb09..8cc8b0d8b1bde7 100644 --- a/static/app/utils/issueTypeConfig/performanceConfig.tsx +++ b/static/app/utils/issueTypeConfig/performanceConfig.tsx @@ -19,6 +19,7 @@ const performanceConfig: IssueCategoryConfigMapping = { disabledReason: t('Not yet supported for performance issues'), }, ignore: {enabled: true}, + resolve: {enabled: true}, resolveInRelease: {enabled: true}, share: {enabled: true}, }, @@ -223,6 +224,7 @@ const performanceConfig: IssueCategoryConfigMapping = { disabledReason: t('Not yet supported for performance issues'), }, ignore: {enabled: true}, + resolve: {enabled: true}, resolveInRelease: { enabled: false, disabledReason: t('Not yet supported for regression issues'), @@ -354,6 +356,7 @@ const performanceConfig: IssueCategoryConfigMapping = { disabledReason: t('Not yet supported for performance issues'), }, ignore: {enabled: true}, + resolve: {enabled: true}, resolveInRelease: { enabled: false, disabledReason: t('Not yet supported for regression issues'), diff --git a/static/app/utils/issueTypeConfig/replayConfig.tsx b/static/app/utils/issueTypeConfig/replayConfig.tsx index 853c06ccb9a20f..ecfbe31430e167 100644 --- a/static/app/utils/issueTypeConfig/replayConfig.tsx +++ b/static/app/utils/issueTypeConfig/replayConfig.tsx @@ -18,6 +18,7 @@ const replayConfig: IssueCategoryConfigMapping = { disabledReason: t('Not supported for replay issues'), }, ignore: {enabled: true}, + resolve: {enabled: true}, resolveInRelease: {enabled: true}, share: {enabled: true}, }, diff --git a/static/app/utils/issueTypeConfig/types.tsx b/static/app/utils/issueTypeConfig/types.tsx index ff4fce12991c18..74717b47f90877 100644 --- a/static/app/utils/issueTypeConfig/types.tsx +++ b/static/app/utils/issueTypeConfig/types.tsx @@ -21,6 +21,7 @@ export type IssueTypeConfig = { deleteAndDiscard: DisabledWithReasonConfig; ignore: DisabledWithReasonConfig; merge: DisabledWithReasonConfig; + resolve: DisabledWithReasonConfig; resolveInRelease: DisabledWithReasonConfig; share: DisabledWithReasonConfig; }; @@ -32,6 +33,12 @@ export type IssueTypeConfig = { * Should show Autofix for this issue type */ autofix: boolean; + /** + * Custom copy for actions and other UI elements + */ + customCopy: { + resolution: string; + }; /** * Is the "Open in Discover" button available for this issue */ diff --git a/static/app/utils/issueTypeConfig/uptimeConfig.tsx b/static/app/utils/issueTypeConfig/uptimeConfig.tsx index b25cb2d5d346a1..d654355858de94 100644 --- a/static/app/utils/issueTypeConfig/uptimeConfig.tsx +++ b/static/app/utils/issueTypeConfig/uptimeConfig.tsx @@ -8,6 +8,7 @@ const uptimeConfig: IssueCategoryConfigMapping = { deleteAndDiscard: {enabled: false}, merge: {enabled: false}, ignore: {enabled: true}, + resolve: {enabled: true}, resolveInRelease: {enabled: true}, share: {enabled: true}, }, diff --git a/static/app/views/issueDetails/actions/index.tsx b/static/app/views/issueDetails/actions/index.tsx index ae47db53968f53..769bb30678c725 100644 --- a/static/app/views/issueDetails/actions/index.tsx +++ b/static/app/views/issueDetails/actions/index.tsx @@ -92,8 +92,10 @@ export function GroupActions({group, project, disabled, event}: GroupActionsProp delete: deleteCap, deleteAndDiscard: deleteDiscardCap, share: shareCap, + resolve: resolveCap, resolveInRelease: resolveInReleaseCap, }, + customCopy: {resolution: resolvedCopyCap}, discover: discoverCap, } = config; @@ -365,38 +367,42 @@ export function GroupActions({group, project, disabled, event}: GroupActionsProp - {isResolved ? t('Resolved') : t('Archived')} + {isResolved ? resolvedCopyCap || t('Resolved') : t('Archived')} - + {resolveCap.enabled && ( + + )} ) : ( - + {resolveCap.enabled && ( + + )} - - - + {resolveCap.enabled && ( + + + + )} )} diff --git a/static/app/views/issueDetails/streamline/sidebar/solutionsSection.spec.tsx b/static/app/views/issueDetails/streamline/sidebar/solutionsSection.spec.tsx index d5e60a607503a0..1121ec5879304f 100644 --- a/static/app/views/issueDetails/streamline/sidebar/solutionsSection.spec.tsx +++ b/static/app/views/issueDetails/streamline/sidebar/solutionsSection.spec.tsx @@ -57,9 +57,13 @@ describe('SolutionsSection', () => { deleteAndDiscard: {enabled: false}, ignore: {enabled: false}, merge: {enabled: false}, + resolve: {enabled: true}, resolveInRelease: {enabled: false}, share: {enabled: false}, }, + customCopy: { + resolution: 'Resolved', + }, attachments: {enabled: false}, autofix: true, discover: {enabled: false},