Skip to content

Commit 1876086

Browse files
authored
fix(issues): Correctly set absolute date on url (#87254)
1 parent e0446ed commit 1876086

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

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

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {space} from 'sentry/styles/space';
1414
import type {Event} from 'sentry/types/event';
1515
import type {Group} from 'sentry/types/group';
1616
import type {Project} from 'sentry/types/project';
17+
import {getUtcDateString} from 'sentry/utils/dates';
1718
import {getPeriod} from 'sentry/utils/duration/getPeriod';
1819
import {getConfigForIssueType} from 'sentry/utils/issueTypeConfig';
1920
import {useLocation} from 'sentry/utils/useLocation';
@@ -126,18 +127,19 @@ export function EventDetailsHeader({group, event, project}: EventDetailsHeaderPr
126127
...props.defaultOptions,
127128
};
128129
}}
129-
onChange={selection => {
130-
const {relative, ...rest} = selection;
130+
onChange={({relative, start, end, utc}) => {
131131
navigate({
132132
...location,
133133
query: {
134134
...location.query,
135-
...rest,
136135
// If selecting the issue open period, remove the stats period query param
137136
statsPeriod:
138137
relative === defaultStatsPeriod?.statsPeriod
139138
? undefined
140139
: relative,
140+
start: start ? getUtcDateString(start) : undefined,
141+
end: end ? getUtcDateString(end) : undefined,
142+
utc: utc ? 'true' : undefined,
141143
},
142144
});
143145
}}

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

+6-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import ButtonBar from 'sentry/components/buttonBar';
88
import {Flex} from 'sentry/components/container/flex';
99
import {LinkButton} from 'sentry/components/core/button';
1010
import Count from 'sentry/components/count';
11+
import ErrorBoundary from 'sentry/components/errorBoundary';
1112
import ErrorLevel from 'sentry/components/events/errorLevel';
1213
import {getBadgeProperties} from 'sentry/components/group/inboxBadges/statusBadge';
1314
import UnhandledTag from 'sentry/components/group/inboxBadges/unhandledTag';
@@ -184,9 +185,11 @@ export default function StreamlinedGroupHeader({
184185
</Subtitle>
185186
</Fragment>
186187
)}
187-
<AttachmentsBadge group={group} />
188-
<UserFeedbackBadge group={group} project={project} />
189-
<ReplayBadge group={group} project={project} />
188+
<ErrorBoundary customComponent={null}>
189+
<AttachmentsBadge group={group} />
190+
<UserFeedbackBadge group={group} project={project} />
191+
<ReplayBadge group={group} project={project} />
192+
</ErrorBoundary>
190193
</Flex>
191194
{issueTypeConfig.eventAndUserCounts.enabled && (
192195
<Fragment>

0 commit comments

Comments
 (0)