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

Use signaling to load project include list

Benjamin Bädorf4603e9a35cd5
diff --git a/frontend/src/app/core/apiv3/paths/apiv3-list-resource.interface.ts b/frontend/src/app/core/apiv3/paths/apiv3-list-resource.interface.ts
index 531b1fa71e0..a47a647eee6 100644
--- a/frontend/src/app/core/apiv3/paths/apiv3-list-resource.interface.ts
+++ b/frontend/src/app/core/apiv3/paths/apiv3-list-resource.interface.ts
@@ -36,6 +36,7 @@ export interface ApiV3ListParameters {
filters?:ApiV3ListFilter[];
sortBy?:[string, string][];
groupBy?:string;
+ select?:string[];
pageSize?:number;
offset?:number;
}
@@ -65,6 +66,10 @@ export function listParamsString(params?:ApiV3ListParameters):string {
queryProps.push(`offset=${params.offset}`);
}
+ if (params && params.select !== undefined) {
+ queryProps.push(`select=${params.select.join(',')}`);
+ }
+
if (params && params.filters) {
const filters = new ApiV3FilterBuilder();
diff --git a/frontend/src/app/shared/components/project-include/project-include.component.ts b/frontend/src/app/shared/components/project-include/project-include.component.ts
index aec497119bd..ff52ae2c2bd 100644
--- a/frontend/src/app/shared/components/project-include/project-include.component.ts
+++ b/frontend/src/app/shared/components/project-include/project-include.component.ts
@@ -180,7 +180,16 @@ export class OpProjectIncludeComponent extends UntilDestroyedMixin {
]);
}
- return { filters, pageSize: -1 };
+ return {
+ filters,
+ pageSize: -1,
+ select: [
+ 'elements/id',
+ 'elements/name',
+ 'elements/self',
+ 'elements/ancestors',
+ ],
+ };
}
constructor(