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

change the functionality of going to back route

bsatarnejadc8fee7035b93
diff --git a/frontend/src/app/modules/common/back-routing/back-routing.service.ts b/frontend/src/app/modules/common/back-routing/back-routing.service.ts
index c7b8566bc36..6f4aaff9c46 100644
--- a/frontend/src/app/modules/common/back-routing/back-routing.service.ts
+++ b/frontend/src/app/modules/common/back-routing/back-routing.service.ts
@@ -52,22 +52,24 @@ export class BackRoutingService {
// Default: back to list
// When coming from a deep link or a create form
const baseRoute = this.backRoute?.baseRoute || this.$state.current.data.baseRoute || 'work-packages.partitioned.list';
-
- if (!this.backRoute || this.backRoute.name.includes('new')) {
- this.$state.go(baseRoute, this.$state.params);
- } else {
- if (this.keepTab.isDetailsState(this.backRoute.parent)) {
- if (preferListOverSplit) {
- this.$state.go(baseRoute, this.backRoute.params);
- } else {
- this.$state.go(baseRoute + this.keepTab.currentDetailsSubState, this.backRoute.params);
- }
+ if (!this.backRoute) { this.$state.reload(); }
+ else {
+ if (this.backRoute.name.includes('new')) {
+ this.$state.go(baseRoute, this.$state.params);
} else {
- if (this.backRoute.parent) {
- this.$state.go(this.backRoute.name, this.backRoute.params).then(() => { this.$state.reload(); });
- }
- else {
- this.$state.go(this.backRoute.name, this.backRoute.params);
+ if (this.keepTab.isDetailsState(this.backRoute.parent)) {
+ if (preferListOverSplit) {
+ this.$state.go(baseRoute, this.backRoute.params);
+ } else {
+ this.$state.go(baseRoute + this.keepTab.currentDetailsSubState, this.backRoute.params);
+ }
+ } else {
+ if (this.backRoute.parent) {
+ this.$state.go(this.backRoute.name, this.backRoute.params).then(() => { this.$state.reload(); });
+ }
+ else {
+ this.$state.go(this.backRoute.name, this.backRoute.params);
+ }
}
}
}