-
-
Notifications
You must be signed in to change notification settings - Fork 817
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
Participant Import: avoid listing custom fields twice #31181
base: master
Are you sure you want to change the base?
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
@@ -273,7 +273,10 @@ protected function getContactFields(string $contactType): array { | |||
*/ | |||
protected function getImportFieldsForEntity(string $entity): array { | |||
return (array) civicrm_api4($entity, 'getFields', [ | |||
'where' => [['usage', 'CONTAINS', 'import']], | |||
'where' => [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmcclelland I'm not too familiar with this code - could you add a comment to explain the where
? I feel like if this behaviour changes at some point in the future and custom fields are missing during import, someone will be very confused about why the condition is that way.
Overview
Custom fields are listed twice on the mapping screen when importing participants
Before
If you create a custom participant field (used for Participants - ANY). Then, click Events -> Import Participants. Add a csv file and go to the Mapping page. You will see that custom fields are listed twice:
After
They are only listed once.
Technical Details
@eileenmcnaughton I think this is a regression from c56953d.