From: Eileen McNaughton Date: Mon, 3 Apr 2023 04:05:33 +0000 (+1200) Subject: Use label, where present X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=efdce4e4bbf4dee44e78482ef20fb2023509d335;p=civicrm-core.git Use label, where present Label is preferred over title - when the metadata comes from the DAO it is in html['label'], but if it comes from apiv4 it seems it is mapped higher up... --- diff --git a/CRM/Import/Form/MapField.php b/CRM/Import/Form/MapField.php index f3eea0aff8..0ddea9ae84 100644 --- a/CRM/Import/Form/MapField.php +++ b/CRM/Import/Form/MapField.php @@ -457,7 +457,7 @@ abstract class CRM_Import_Form_MapField extends CRM_Import_Forms { continue; } $childField = [ - 'text' => $field['html']['label'] ?? $field['title'], + 'text' => $field['label'] ?? ($field['html']['label'] ?? $field['title']), 'id' => $fieldName, 'has_location' => !empty($field['hasLocationType']), 'default_value' => $field['default_value'] ?? '',