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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Load the correct successor state after copying/creating child
Oliver Günther88d22fc52217
diff --git a/frontend/src/app/components/op-context-menu/wp-context-menu/wp-view-context-menu.directive.ts b/frontend/src/app/components/op-context-menu/wp-context-menu/wp-view-context-menu.directive.tsindex ecca941f2b4..3281fd46014 100644--- a/frontend/src/app/components/op-context-menu/wp-context-menu/wp-view-context-menu.directive.ts+++ b/frontend/src/app/components/op-context-menu/wp-context-menu/wp-view-context-menu.directive.ts@@ -74,7 +74,7 @@ export class WorkPackageViewContextMenu extends OpContextMenuHandler {break;case 'relation-new-child':- this.wpRelationsHierarchyService.addNewChildWp(this.workPackage);+ this.wpRelationsHierarchyService.addNewChildWp(this.baseRoute, this.workPackage);break;default:diff --git a/frontend/src/app/components/wp-copy/wp-copy-split-view.component.ts b/frontend/src/app/components/wp-copy/wp-copy-split-view.component.tsindex b69be7b74ca..79139e376f8 100644--- a/frontend/src/app/components/wp-copy/wp-copy-split-view.component.ts+++ b/frontend/src/app/components/wp-copy/wp-copy-split-view.component.ts@@ -35,6 +35,5 @@ import {WorkPackageCopyController} from 'core-components/wp-copy/wp-copy.controltemplateUrl: '../wp-new/wp-new-split-view.html'})export class WorkPackageCopySplitViewComponent extends WorkPackageCopyController {- public successState = 'work-packages.partitioned.list.details';}diff --git a/frontend/src/app/components/wp-new/wp-create.component.ts b/frontend/src/app/components/wp-new/wp-create.component.tsindex 41bcc32bc66..b56d6f0ea95 100644--- a/frontend/src/app/components/wp-new/wp-create.component.ts+++ b/frontend/src/app/components/wp-new/wp-create.component.ts@@ -48,7 +48,7 @@ import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixi@Directive()export class WorkPackageCreateComponent extends UntilDestroyedMixin implements OnInit {- public successState:string;+ public successState:string = this.$state.current.data.baseRoute + '.details';public cancelState:string = this.$state.current.data.baseRoute;public newWorkPackage:WorkPackageResource;public parentWorkPackage:WorkPackageResource;diff --git a/frontend/src/app/components/wp-new/wp-new-split-view.component.ts b/frontend/src/app/components/wp-new/wp-new-split-view.component.tsindex 17751d530d7..629358496cd 100644--- a/frontend/src/app/components/wp-new/wp-new-split-view.component.ts+++ b/frontend/src/app/components/wp-new/wp-new-split-view.component.ts@@ -27,8 +27,7 @@// ++import {WorkPackageCreateComponent} from 'core-components/wp-new/wp-create.component';-import {ChangeDetectionStrategy, Component, ViewChild} from '@angular/core';-import {EditFormComponent} from "core-app/modules/fields/edit/edit-form/edit-form.component";+import {ChangeDetectionStrategy, Component} from '@angular/core';@Component({selector: 'wp-new-split-view',@@ -36,5 +35,4 @@ import {EditFormComponent} from "core-app/modules/fields/edit/edit-form/edit-forchangeDetection: ChangeDetectionStrategy.OnPush,})export class WorkPackageNewSplitViewComponent extends WorkPackageCreateComponent {- public successState:string = this.$state.current.data.baseRoute + '.details';}diff --git a/frontend/src/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts b/frontend/src/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.tsindex a1ff5b2fa5b..cc31dfff88b 100644--- a/frontend/src/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts+++ b/frontend/src/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts@@ -46,7 +46,7 @@ export class WorkPackageRelationsHierarchyService {}- public changeParent(workPackage:WorkPackageResource, parentId:string | null) {+ public changeParent(workPackage:WorkPackageResource, parentId:string|null) {let payload:any = {lockVersion: workPackage.lockVersion};@@ -91,7 +91,7 @@ export class WorkPackageRelationsHierarchyService {public addExistingChildWp(workPackage:WorkPackageResource, childWpId:string):Promise<WorkPackageResource> {return this.wpCacheService.require(childWpId)- .then((wpToBecomeChild:WorkPackageResource | undefined) => {+ .then((wpToBecomeChild:WorkPackageResource|undefined) => {return this.changeParent(wpToBecomeChild!, workPackage.id!).then(wp => {this.wpCacheService.loadWorkPackage(workPackage.id!, true);@@ -106,11 +106,11 @@ export class WorkPackageRelationsHierarchyService {});}- public addNewChildWp(workPackage:WorkPackageResource) {+ public addNewChildWp(baseRoute:string, workPackage:WorkPackageResource) {workPackage.project.$load().then(() => {const args = [- 'work-packages.partitioned.list.new',+ baseRoute + '.new',{parent_id: workPackage.id}diff --git a/frontend/src/app/modules/bim/ifc_models/bcf/new-split/bcf-new-split.component.ts b/frontend/src/app/modules/bim/ifc_models/bcf/new-split/bcf-new-split.component.tsindex 2369fc06c8d..55ec35fd531 100644--- a/frontend/src/app/modules/bim/ifc_models/bcf/new-split/bcf-new-split.component.ts+++ b/frontend/src/app/modules/bim/ifc_models/bcf/new-split/bcf-new-split.component.ts@@ -37,7 +37,6 @@ import {IFCViewerService} from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-vtemplateUrl: './bcf-new-split.component.html'})export class BCFNewSplitComponent extends WorkPackageCreateComponent {- public successState:string = '^.details';public cancelState:string = '^';@InjectField()