Skip to content

The open alternative to Salesforce, designed for AI.

fix incorrect data in sample export (#14933)

Etiennef037e92dfa12
diff --git a/packages/twenty-front/src/modules/settings/data-model/constants/SettingsNonCompositeFieldTypeConfigs.ts b/packages/twenty-front/src/modules/settings/data-model/constants/SettingsNonCompositeFieldTypeConfigs.ts
index 6e96ae9677a..40a84ca08b1 100644
--- a/packages/twenty-front/src/modules/settings/data-model/constants/SettingsNonCompositeFieldTypeConfigs.ts
+++ b/packages/twenty-front/src/modules/settings/data-model/constants/SettingsNonCompositeFieldTypeConfigs.ts
@@ -53,9 +53,9 @@ export const SETTINGS_NON_COMPOSITE_FIELD_TYPE_CONFIGS: SettingsNonCompositeFiel
label: 'Unique ID',
Icon: IllustrationIconUid,
exampleValues: [
- '00000000-0000-0000-0000-000000000000',
- '00000000-0000-0000-0000-000000000001',
- '00000000-0000-0000-0000-000000000002',
+ '00000000-0000-4000-8000-000000000000',
+ '00000000-0000-4000-8000-000000000001',
+ '00000000-0000-4000-8000-000000000003',
],
category: 'Advanced',
} as const satisfies SettingsFieldTypeConfig<FieldUUidValue>,
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/UploadStep/hooks/useDownloadFakeRecords.ts b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/UploadStep/hooks/useDownloadFakeRecords.ts
index b266e0f24fe..f85edba34a1 100644
--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/UploadStep/hooks/useDownloadFakeRecords.ts
+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/UploadStep/hooks/useDownloadFakeRecords.ts
@@ -121,14 +121,16 @@ export const useDownloadFakeRecords = () => {
return { headerRow, bodyRows };
};
- const formatToCsvContent = (rows: string[][]) => {
+ const formatToCsvContent = (rows: (string | JSON | string[])[][]) => {
const escapedRows = rows.map((row) => {
- return row.map((value) =>
- formatValueForCSV(sanitizeValueForCSVExport(value)),
- );
+ return row.map((value) => {
+ const stringifiedValue =
+ typeof value === 'string' ? value : JSON.stringify(value);
+ return formatValueForCSV(sanitizeValueForCSVExport(stringifiedValue));
+ });
});
- const csvContent = [...escapedRows.map((row) => row.join(','))].join('\n');
+ const csvContent = escapedRows.map((row) => row.join(',')).join('\n');
return [csvContent];
};