Skip to content

Commit 22328e2

Browse files
authored
fix(issue-details): Do not show since first seen when config is disabled (#103176)
1 parent e3ba38b commit 22328e2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

static/app/views/issueDetails/streamline/eventDetailsHeader.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export function EventDetailsHeader({group, event, project}: EventDetailsHeaderPr
6161
const hasSetStatsPeriod =
6262
location.query.statsPeriod || location.query.start || location.query.end;
6363
const defaultStatsPeriod = useGroupDefaultStatsPeriod(group, project);
64+
const shouldShowSinceFirstSeenOption = issueTypeConfig.defaultTimePeriod.sinceFirstSeen;
6465
const period = hasSetStatsPeriod
6566
? getPeriod({
6667
start: location.query.start as string,
@@ -132,7 +133,8 @@ export function EventDetailsHeader({group, event, project}: EventDetailsHeaderPr
132133
return {
133134
...props.arbitraryOptions,
134135
// Always display arbitrary issue open period
135-
...(defaultStatsPeriod?.statsPeriod
136+
...(defaultStatsPeriod?.statsPeriod &&
137+
shouldShowSinceFirstSeenOption
136138
? {
137139
[defaultStatsPeriod.statsPeriod]: t(
138140
'%s (since first seen)',
@@ -162,7 +164,8 @@ export function EventDetailsHeader({group, event, project}: EventDetailsHeaderPr
162164
triggerProps={{
163165
children:
164166
period === defaultStatsPeriod &&
165-
!defaultStatsPeriod.isMaxRetention
167+
!defaultStatsPeriod.isMaxRetention &&
168+
shouldShowSinceFirstSeenOption
166169
? t('Since First Seen')
167170
: undefined,
168171
style: {

0 commit comments

Comments
 (0)