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 for cost reports

Oliver Günther696981e8e021
diff --git a/frontend/src/app/modules/reporting/openproject-reporting.module.ts b/frontend/src/app/modules/reporting/openproject-reporting.module.ts
index 6df3dfc6305..6bddd7ce726 100644
--- a/frontend/src/app/modules/reporting/openproject-reporting.module.ts
+++ b/frontend/src/app/modules/reporting/openproject-reporting.module.ts
@@ -30,7 +30,6 @@ import {NgModule} from '@angular/core';
import {UIRouterModule} from "@uirouter/angular";
import {
REPORTING_ROUTES,
- uiRouterReportingConfiguration
} from "core-app/modules/reporting/openproject-reporting.routes";
import {ReportingPageComponent} from "core-app/modules/reporting/reporting-page/reporting-page.component";
@@ -38,8 +37,7 @@ import {ReportingPageComponent} from "core-app/modules/reporting/reporting-page/
imports: [
// Routes for /cost_reports
UIRouterModule.forChild({
- states: REPORTING_ROUTES,
- config: uiRouterReportingConfiguration
+ states: REPORTING_ROUTES
}),
],
declarations: [
diff --git a/frontend/src/app/modules/reporting/openproject-reporting.routes.ts b/frontend/src/app/modules/reporting/openproject-reporting.routes.ts
index 26fae1c323a..966e516fa78 100644
--- a/frontend/src/app/modules/reporting/openproject-reporting.routes.ts
+++ b/frontend/src/app/modules/reporting/openproject-reporting.routes.ts
@@ -33,19 +33,7 @@ export const REPORTING_ROUTES:Ng2StateDeclaration[] = [
{
name: 'reporting',
parent: 'root',
- // The trailing slash is important
- // cf., https://community.openproject.com/wp/29754
- url: '/cost_reports/',
+ url: '/cost_reports',
component: ReportingPageComponent
},
];
-
-export function uiRouterReportingConfiguration(uiRouter:UIRouter) {
- // Ensure backlogs/ are being redirected correctly
- // cf., https://community.openproject.com/wp/29754
- uiRouter.urlService.rules
- .when(
- new RegExp("^/projects/(.*)/cost_reports$"),
- match => `/projects/${match[1]}/cost_reports/`
- );
-}