Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add upgrade for label to name conversion in civicrm_mapping_field for multiple custom imports #23737

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Jun 9, 2022

Overview

Add upgrade for label to name conversion in civicrm_mapping_field for multiple custom imports

Before

Fields in saved import mappings for multiple custom imports won't load be picked up on latest code

After

Updated in upgrade from (eg.) School Level :: "Education to custom_14

Technical Details

Comments

I did r-run this

@civibot
Copy link

civibot bot commented Jun 9, 2022

(Standard links)

@civibot civibot bot added the master label Jun 9, 2022
@eileenmcnaughton eileenmcnaughton changed the title Import up multi Add upgrade for label to name conversion in civicrm_mapping_field for multiple custom imports Jun 9, 2022
It wouldn't be that much more to go further & use the group.fieldname format - ....

Add upgrade script to convert saved field mappings to use names
@colemanw colemanw merged commit 8720f08 into civicrm:master Jun 9, 2022
@colemanw colemanw deleted the import_up_multi branch June 9, 2022 21:20
->setSelect(['id', 'name'])
->addWhere('mapping_id.mapping_type_id:name', '=', 'Import Multi value custom data')
->execute();
$allFields = civicrm_api3('custom_field', 'get', ['custom_group_id.is_multiple' => TRUE, 'return' => ['label', 'custom_group_id.title']])['values'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple high-level service calls... in the context of an upgrade... 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants