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
Avoid the first request in the team planner module
Oliver Günther8b2c8857a106
diff --git a/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts b/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.tsindex c3f27d8e896..bc0e838ecaa 100644--- a/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts+++ b/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts@@ -102,4 +102,15 @@ export class TeamPlannerPageComponent extends PartitionedQuerySpacePageComponentprotected staticQueryName(query:QueryResource):string {return this.text.unsaved_title;}++ /**+ * We only want to load the initial query if it is saved+ * @protected+ */+ protected loadInitialQuery():void {+ const queryId = this.uiRouterGlobals.params.queryId as string|null;+ if (queryId) {+ super.loadInitialQuery();+ }+ }}diff --git a/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts b/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.tsindex 653357af7af..ca0e54e3f1c 100644--- a/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts+++ b/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts@@ -47,6 +47,7 @@ import { OpModalService } from 'core-app/shared/components/modal/modal.service';import { InviteUserModalComponent } from 'core-app/features/invite-user-modal/invite-user.component';import { WorkPackageFilterContainerComponent } from 'core-app/features/work-packages/components/filters/filter-container/filter-container.directive';import isPersistedResource from 'core-app/features/hal/helpers/is-persisted-resource';+import { UIRouterGlobals } from '@uirouter/core';export interface DynamicComponentDefinition {component:ComponentType<any>;@@ -80,6 +81,8 @@ export class PartitionedQuerySpacePageComponent extends WorkPackagesViewBase imp@InjectField() opModalService:OpModalService;+ @InjectField() uiRouterGlobals:UIRouterGlobals;+text:{ [key:string]:string } = {jump_to_pagination: this.I18n.t('js.work_packages.jump_marks.pagination'),text_jump_to_pagination: this.I18n.t('js.work_packages.jump_marks.label_pagination'),@@ -137,8 +140,7 @@ export class PartitionedQuerySpacePageComponent extends WorkPackagesViewBase imp});// Load the query. If it hasn't been loaded before, do that visibly.- const isFirstLoad = !this.querySpace.initialized.hasValue();- this.loadingIndicator = this.loadQuery(isFirstLoad);+ this.loadInitialQuery();// Mark tableInformationLoaded when initially loading donethis.setupInformationLoadedListener();@@ -296,4 +298,9 @@ export class PartitionedQuerySpacePageComponent extends WorkPackagesViewBase impprotected staticQueryName(query:QueryResource):string {return this.opStaticQueries.getStaticName(query);}++ protected loadInitialQuery():void {+ const isFirstLoad = !this.querySpace.initialized.hasValue();+ this.loadingIndicator = this.loadQuery(isFirstLoad);+ }}