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

dev/core#3498 Fix mishandled option values #23736

Merged
merged 3 commits into from
Jun 9, 2022

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Jun 9, 2022

Overview

dev/core#3498 Fix mishandled option values

Before

Options are not validated for multi-record custom import

After

Options are validated
'guessing' of fields is working better -in 5.50 looks like

image

but with this PR

image

Technical Details

The issue was the code to load the valid options for each field was not working on multi-value custom record sets

Comments

Data patterns -do they REALLY add any value? I feel like they make it more confusing...

@civibot
Copy link

civibot bot commented Jun 9, 2022

(Standard links)

@totten
Copy link
Member

totten commented Jun 9, 2022

civibot, test this please

$this->createCustomGroupWithFieldOfType(['is_multiple' => TRUE, 'extends' => 'Contact'], 'select', 'level');
$customGroupID = $this->ids['CustomGroup']['level'];
$dateFieldID = $this->createDateCustomField(['date_format' => 'yy', 'custom_group_id' => $customGroupID])['id'];
$this->importCSV('custom_data_date_select.csv', [
Copy link
Member

Choose a reason for hiding this comment

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

There's a test failure:

fopen(/home/jenkins/bknix-dfl/build/core-23736-3prig/web/sites/all/modules/civicrm/tests/phpunit/CRM/Custom/Import/Parser/data/custom_data_date_select.csv): Failed to open stream: No such file or directory

I think maybe this file wasn't committed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice change from the extra file commits @demeritcowboy has been culling for me :-)

@totten
Copy link
Member

totten commented Jun 9, 2022

I did some r-run and confirmed that the custom-data importer was better about warnings and more clever about matching the headers. :)

Added a comment about a test failure. I think if that's resolved, then we can merge.

@eileenmcnaughton eileenmcnaughton merged commit 2e881e7 into civicrm:master Jun 9, 2022
@eileenmcnaughton eileenmcnaughton deleted the import_multi branch June 9, 2022 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants