Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix trailing slash redirect, this breaks onboarding tour by not taking over the query param

Oliver Güntherd12fd7aa939a
diff --git a/frontend/src/app/features/overview/openproject-overview.module.ts b/frontend/src/app/features/overview/openproject-overview.module.ts
index c8ce3a0cf4a..a886eccdd83 100644
--- a/frontend/src/app/features/overview/openproject-overview.module.ts
+++ b/frontend/src/app/features/overview/openproject-overview.module.ts
@@ -48,13 +48,13 @@ export const OVERVIEW_ROUTES:Ng2StateDeclaration[] = [
},
];
-export function uiRouterOverviewConfiguration(uiRouter:UIRouter) {
+export function uiRouterOverviewConfiguration(uiRouter:UIRouter):void {
// Ensure projects/:project_id/ are being redirected correctly
// cf., https://community.openproject.com/wp/29754
uiRouter.urlService.rules
.when(
- new RegExp('^/projects(?!/new$)/([^/]+)$'),
- (match) => `/projects/${match[1]}/`,
+ new RegExp('^/projects(?!/new$)/([^/\\?]+)(\\?.*)?$'),
+ (match:string[]) => `/projects/${match[1]}/${match[2] || ''}`,
);
}