From 3caee38cc8ea6ae4f695c6c44257ec4afe9ae1fe Mon Sep 17 00:00:00 2001 From: GloireMutaliko21 Date: Thu, 26 Sep 2024 07:49:38 +0200 Subject: [PATCH 1/2] fix: project members IDs on creation --- packages/contracts/src/organization-team.model.ts | 4 ++-- .../src/organization-project/organization-project.service.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/contracts/src/organization-team.model.ts b/packages/contracts/src/organization-team.model.ts index 2c60250a184..1d49272cc4d 100644 --- a/packages/contracts/src/organization-team.model.ts +++ b/packages/contracts/src/organization-team.model.ts @@ -49,8 +49,8 @@ export interface IOrganizationTeamCreateInput extends IBasePerTenantAndOrganizat requirePlanToTrack?: boolean; public?: boolean; profile_link?: string; - memberIds?: string[]; - managerIds?: string[]; + memberIds?: ID[]; + managerIds?: ID[]; tags?: ITag[]; projects?: IOrganizationProject[]; } diff --git a/packages/core/src/organization-project/organization-project.service.ts b/packages/core/src/organization-project/organization-project.service.ts index c9005e4d565..ce9758b9cc0 100644 --- a/packages/core/src/organization-project/organization-project.service.ts +++ b/packages/core/src/organization-project/organization-project.service.ts @@ -95,8 +95,8 @@ export class OrganizationProjectService extends TenantAwareCrudService manager.id); - const memberIds = members.map((member) => member.id); + const managerIds = managers.map((manager) => manager.employeeId); + const memberIds = members.map((member) => member.employeeId); // If the employee creates the project, default add as a manager try { From 5f61b9b47d349a28057a43cdc6d6b4be69dba0ae Mon Sep 17 00:00:00 2001 From: GloireMutaliko21 Date: Thu, 26 Sep 2024 07:53:01 +0200 Subject: [PATCH 2/2] fix: project members IDs on updating --- .../src/organization-project/organization-project.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/organization-project/organization-project.service.ts b/packages/core/src/organization-project/organization-project.service.ts index ce9758b9cc0..28202bdb315 100644 --- a/packages/core/src/organization-project/organization-project.service.ts +++ b/packages/core/src/organization-project/organization-project.service.ts @@ -229,8 +229,8 @@ export class OrganizationProjectService extends TenantAwareCrudService manager.id); - const memberIds = members.map((member) => member.id); + const managerIds = managers.map((manager) => manager.employeeId); + const memberIds = members.map((member) => member.employeeId); if (isNotEmpty(memberIds) || isNotEmpty(managerIds)) { // Find the manager role const role = await this._roleService.findOneByWhereOptions({