-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
ref(routes): replace stats nav-v2 redirect with route-level redirects #111703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,7 +36,6 @@ import {OverviewWrapper} from 'sentry/views/issueList/overviewWrapper'; | |
| import {IssueTaxonomy} from 'sentry/views/issueList/taxonomies'; | ||
| import {OrganizationContainerRoute} from 'sentry/views/organizationContainer'; | ||
| import {OrganizationLayout} from 'sentry/views/organizationLayout'; | ||
| import {OrganizationStatsWrapper} from 'sentry/views/organizationStats/organizationStatsWrapper'; | ||
| import {Tab as TransactionSummaryTab} from 'sentry/views/performance/transactionSummary/tabs'; | ||
| import {ProjectEventRedirect} from 'sentry/views/projectEventRedirect'; | ||
| import {redirectDeprecatedProjectRoute} from 'sentry/views/projects/redirectDeprecatedProjectRoute'; | ||
|
|
@@ -814,12 +813,21 @@ function buildRoutes(): RouteObject[] { | |
| { | ||
| path: '/stats/', | ||
| withOrgPath: true, | ||
| component: OrganizationStatsWrapper, | ||
| children: statsChildren, | ||
| redirectTo: '/settings/stats/', | ||
| }, | ||
| { | ||
| path: '/stats/issues/', | ||
| withOrgPath: true, | ||
| redirectTo: '/settings/stats/issues/', | ||
| }, | ||
| { | ||
| path: '/stats/health/', | ||
| withOrgPath: true, | ||
| redirectTo: '/settings/stats/health/', | ||
| }, | ||
| { | ||
| path: '/organizations/:orgId/stats/team/', | ||
| redirectTo: '/organizations/:orgId/stats/issues/', | ||
| redirectTo: '/organizations/:orgId/settings/stats/issues/', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| }, | ||
| ], | ||
| }; | ||
|
|
||
This file was deleted.


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: When a route uses both
withOrgPath: trueandredirectTo, thewithOrgPathproperty is ignored, preventing the creation of organization-prefixed redirect routes and causing 404 errors.Severity: HIGH
Suggested Fix
Refactor the
translateSentryRoute()function to ensure thewithOrgPathlogic is applied even whenredirectTois present. This likely involves processingwithOrgPathto generate both base and organization-prefixed routes before handling theredirectToproperty for each generated route.Prompt for AI Agent
Did we get this right? 👍 / 👎 to inform future reviews.