mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-04 23:18:01 +00:00
feat: allow existing custom fields to keep its type on excel import (#1976)
This commit is contained in:
committed by
GitHub
parent
c3a7cd6a39
commit
0b3ba65df3
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user