From 58904ad9ee9bb72b83980beed984e4df86d0f44a Mon Sep 17 00:00:00 2001 From: gsmithun4 Date: Fri, 14 Apr 2023 15:39:54 +0530 Subject: [PATCH 1/2] Release v2.4.4 --- .version | 2 +- server/.version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.version b/.version index 35cee72dcb..79a614418f 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.4.3 +2.4.4 diff --git a/server/.version b/server/.version index 35cee72dcb..79a614418f 100644 --- a/server/.version +++ b/server/.version @@ -1 +1 @@ -2.4.3 +2.4.4 From b955d3096651dd9716b32080ec17522c07be59b4 Mon Sep 17 00:00:00 2001 From: vjaris42 Date: Fri, 14 Apr 2023 16:59:27 +0530 Subject: [PATCH 2/2] fix: app import (#6043) --- .../src/services/app_import_export.service.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/server/src/services/app_import_export.service.ts b/server/src/services/app_import_export.service.ts index 53d82c5a62..99446d867e 100644 --- a/server/src/services/app_import_export.service.ts +++ b/server/src/services/app_import_export.service.ts @@ -323,6 +323,24 @@ export class AppImportExportService { if (!appEnvironments?.length) { currentOrgEnvironments.map((env) => (appEnvironmentMapping[env.id] = env.id)); + } else if (appEnvironments?.length && appEnvironments[0]?.appVersionId) { + const appVersionedEnvironments = appEnvironments.filter((appEnv) => appEnv.appVersionId === appVersion.id); + for (const currentOrgEnv of currentOrgEnvironments) { + const appEnvironment = appVersionedEnvironments.filter((appEnv) => appEnv.name === currentOrgEnv.name)[0]; + if (appEnvironment) { + appEnvironmentMapping[appEnvironment.id] = currentOrgEnv.id; + } else { + const env = manager.create(AppEnvironment, { + organizationId: user.organizationId, + name: currentOrgEnv.name, + isDefault: currentOrgEnv.isDefault, + createdAt: new Date(), + updatedAt: new Date(), + }); + await manager.save(env); + appEnvironmentMapping[env.id] = env.id; + } + } } else { //For apps imported on v2 where organizationId not available for (const currentOrgEnv of currentOrgEnvironments) {