fix: composite field label retrieval in spreadsheet import utility (#15489)

Fixes - https://github.com/twentyhq/twenty/issues/15368

Seems like the sub field was not being used for the actual label lookup
part

<img width="1302" height="354" alt="image"
src="https://github.com/user-attachments/assets/444f76be-117b-4b8b-91fe-dedd293e09af"
/>
This commit is contained in:
Ranjeet Baraik
2025-10-31 11:39:39 +01:00
committed by GitHub
parent d6bfbcc5ab
commit 6ed1fd841d
@@ -9,9 +9,9 @@ export const getRelationConnectSubFieldLabel = (
compositeSubFieldKey?: string,
) => {
const compositeSubFieldLabel =
isCompositeFieldType(fieldMetadataItem.type) &&
isCompositeFieldType(uniqueFieldMetadataItem.type) &&
isDefined(compositeSubFieldKey)
? COMPOSITE_FIELD_SUB_FIELD_LABELS[fieldMetadataItem.type][
? COMPOSITE_FIELD_SUB_FIELD_LABELS[uniqueFieldMetadataItem.type][
compositeSubFieldKey
]
: undefined;