From b3b290aaef1303e140a8ad16cf289c0e8c7b1fc3 Mon Sep 17 00:00:00 2001 From: kwasniew Date: Fri, 16 Feb 2024 10:04:11 +0100 Subject: [PATCH] fix: backport import all strategy fields --- .../export-import-toggles/export-import-service.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/lib/features/export-import-toggles/export-import-service.ts b/src/lib/features/export-import-toggles/export-import-service.ts index 729db717cbe1..e0de4afaf1aa 100644 --- a/src/lib/features/export-import-toggles/export-import-service.ts +++ b/src/lib/features/export-import-toggles/export-import-service.ts @@ -345,17 +345,11 @@ export default class ExportImportService await Promise.all( dto.data.featureStrategies ?.filter(hasFeatureName) - .map((featureStrategy) => + .map(({ featureName, ...restOfFeatureStrategy }) => this.featureToggleService.createStrategy( + restOfFeatureStrategy, { - name: featureStrategy.name, - constraints: featureStrategy.constraints, - parameters: featureStrategy.parameters, - segments: featureStrategy.segments, - sortOrder: featureStrategy.sortOrder, - }, - { - featureName: featureStrategy.featureName, + featureName, environment: dto.environment, projectId: dto.project, },