Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export function EventDetailsHeader({group, event, project}: EventDetailsHeaderPr
const hasSetStatsPeriod =
location.query.statsPeriod || location.query.start || location.query.end;
const defaultStatsPeriod = useGroupDefaultStatsPeriod(group, project);
const shouldShowSinceFirstSeenOption = issueTypeConfig.defaultTimePeriod.sinceFirstSeen;
const period = hasSetStatsPeriod
? getPeriod({
start: location.query.start as string,
Expand Down Expand Up @@ -132,7 +133,8 @@ export function EventDetailsHeader({group, event, project}: EventDetailsHeaderPr
return {
...props.arbitraryOptions,
// Always display arbitrary issue open period
...(defaultStatsPeriod?.statsPeriod
...(defaultStatsPeriod?.statsPeriod &&
shouldShowSinceFirstSeenOption
? {
[defaultStatsPeriod.statsPeriod]: t(
'%s (since first seen)',
Expand Down Expand Up @@ -162,7 +164,8 @@ export function EventDetailsHeader({group, event, project}: EventDetailsHeaderPr
triggerProps={{
children:
period === defaultStatsPeriod &&
!defaultStatsPeriod.isMaxRetention
!defaultStatsPeriod.isMaxRetention &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Dropdown choice incorrectly clears configuration.

The onChange handler clears statsPeriod when relative === defaultStatsPeriod?.statsPeriod without checking shouldShowSinceFirstSeenOption. When this config is false, defaultStatsPeriod.statsPeriod is always "14d", so selecting "14 days" from the dropdown incorrectly clears the URL parameter instead of setting it. The special clearing logic should only apply when shouldShowSinceFirstSeenOption is true.

Fix in Cursor Fix in Web

shouldShowSinceFirstSeenOption
? t('Since First Seen')
: undefined,
style: {
Expand Down
Loading