Skip to content

Commit

Permalink
Merge pull request #17697 from MegaphoneJon/multi-record-import-fix
Browse files Browse the repository at this point in the history
Multi record import screen fix
  • Loading branch information
seamuslee001 authored Jun 26, 2020
2 parents a5e01e6 + a55b3c0 commit ec96d34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CRM/Core/BAO/Mapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public static function getCreateMappingValues($mappingType) {
civicrm_api3('OptionValue', 'create', [
'option_group_id' => 'mapping_type',
'label' => $mappingType,
'name' => $mappingType,
'value' => max(array_keys($mappingValues['values'])) + 1,
'is_reserved' => 1,
]);
Expand Down
7 changes: 7 additions & 0 deletions tests/phpunit/CRM/Core/BAO/MappingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,11 @@ public function getMappingMaps() {
];
}

/**
* Ensure getCreateMappingValues() doesn't return an error when there are spaces in the name.
*/
public function testGetCreateMappingValues() {
CRM_Core_BAO_Mapping::getCreateMappingValues("Import Multi value custom data");
}

}

0 comments on commit ec96d34

Please sign in to comment.