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

Take care that the WP create button links to the correct module for the split create form

Henriette Dargecd39eceb0f5b
diff --git a/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts b/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts
index d2dd6bcbcf7..feff4e477df 100644
--- a/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts
+++ b/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts
@@ -66,7 +66,7 @@ export class WorkPackageViewPageComponent extends PartitionedQuerySpacePageCompo
{
component: WorkPackageCreateButtonComponent,
inputs: {
- stateName$: of('work-packages.partitioned.list.new'),
+ stateName$: of(this.stateName),
allowed: ['work_packages.createWorkPackage'],
},
},
@@ -123,4 +123,12 @@ export class WorkPackageViewPageComponent extends PartitionedQuerySpacePageCompo
protected shouldUpdateHtmlTitle():boolean {
return this.$state.current.name === 'work-packages.partitioned.list';
}
+
+ private get stateName() {
+ if (this.$state.current.name?.includes('gantt')) {
+ return 'gantt.partitioned.list.new';
+ }
+
+ return 'work-packages.partitioned.list.new';
+ }
}