From 0b3ba65df35b147aa8dcb9fee8d4ece79e83c23d Mon Sep 17 00:00:00 2001 From: Alex Christoffer Rasmussen Date: Tue, 17 Feb 2026 07:59:27 +0800 Subject: [PATCH] feat: allow existing custom fields to keep its type on excel import (#1976) --- apps/server/src/api-data/excel/excel.utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/server/src/api-data/excel/excel.utils.ts b/apps/server/src/api-data/excel/excel.utils.ts index 1b9c2efa9..ac87becb5 100644 --- a/apps/server/src/api-data/excel/excel.utils.ts +++ b/apps/server/src/api-data/excel/excel.utils.ts @@ -33,10 +33,11 @@ export function getCustomFieldData( // we lower case the excel key to make it easier to match const columnNameInExcel = importMap.custom[ontimeLabel].toLowerCase(); const maybeExistingColour = existingCustomFields[keyInCustomFields]?.colour ?? ''; + const maybeExistingType = existingCustomFields[keyInCustomFields]?.type ?? 'text'; // 1. add the custom field to the merged custom fields mergedCustomFields[keyInCustomFields] = { - type: 'text', // we currently only support text custom fields + type: maybeExistingType, colour: maybeExistingColour, label: ontimeLabel, };