Skip to content

Commit ca72daa

Browse files
committed
fix:resolved language mapper bugs and added custom starting message for migration
1 parent 30917e3 commit ca72daa

File tree

7 files changed

+132
-56
lines changed

7 files changed

+132
-56
lines changed

api/src/services/migration.service.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ const startMigration = async (req: Request): Promise<any> => {
522522
.findIndex({ id: projectId })
523523
.value();
524524
if (index > -1) {
525-
ProjectModelLowdb.update((data: any) => {
525+
await ProjectModelLowdb.update((data: any) => {
526526
data.projects[index].isMigrationStarted = true;
527527
});
528528
}
@@ -538,6 +538,18 @@ const startMigration = async (req: Request): Promise<any> => {
538538
projectId,
539539
`${project?.destination_stack_id}.log`
540540
);
541+
const message = getLogMessage(
542+
'start Migration',
543+
'Starting Migration...',
544+
{}
545+
);
546+
await customLogger(
547+
projectId,
548+
project?.destination_stack_id,
549+
'info',
550+
message
551+
);
552+
541553
await setLogFilePath(loggerPath);
542554

543555
const copyLogsToStack = async (

api/src/utils/content-type-creator.utils.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,19 @@ const mergeFields = async (schema1: any[], schema2: any[]): Promise<any[]> => {
713713
}
714714

715715
}
716+
717+
for (const field1 of schema1) {
718+
const isMatched = schema2.some(
719+
(field2) =>
720+
field1.uid === field2.uid &&
721+
field1.data_type === field2.data_type
722+
);
723+
724+
if (!isMatched) {
725+
result.push(field1);
726+
}
727+
}
728+
716729
return result;
717730
}
718731

ui/src/components/ContentMapper/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R
982982
});
983983

984984
setRowIds(selectedObj);
985+
setTableData(updatedTableData);
985986
setSelectedEntries(updatedTableData);
986987
};
987988

0 commit comments

Comments
 (0)