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#4286 APIv4 - Improve export action handling of $match param #26237

Merged
merged 2 commits into from
May 25, 2023

Conversation

colemanw
Copy link
Member

Overview

Improves DX when exporting records from the API Explorer.
See dev/core#4286 Fatal error with managed custom groups containing duplicate field names

Before

"Match" param not automatically supplied.

After

"Match" param automatically set to "name" and augmented for linked entities.

Technical Details

If you try exporting a custom field group, it will default to matching on "name". Fields will cascade to matching on "name" + "custom_group_id". Any option groups related to the fields will also match on "name" and their option values will match on "name" + "option_group_id".

@civibot
Copy link

civibot bot commented May 16, 2023

No issue was found matching the number given in the pull request title. Please check the issue number.

@civibot
Copy link

civibot bot commented May 16, 2023

(Standard links)

@civibot civibot bot added the master label May 16, 2023
As of 98511f0 the API Export action now returns the correct value for 'match' by default, so it no longer needs to be hard-coded.
@eileenmcnaughton
Copy link
Contributor

@awestuk from memory this was one you logged?

@awestuk
Copy link
Contributor

awestuk commented May 17, 2023

It was - I'll try to test this one tomorrow

@aydun
Copy link
Contributor

aydun commented May 24, 2023

Test this please

@aydun
Copy link
Contributor

aydun commented May 24, 2023

I haven't tested extensively, but it seems to work as described and is a better default than previously, so better merged than not.

@colemanw colemanw added the merge ready PR will be merged after a few days if there are no objections label May 24, 2023
@eileenmcnaughton eileenmcnaughton merged commit e371a09 into civicrm:master May 25, 2023
@eileenmcnaughton eileenmcnaughton deleted the exportMatchFields branch May 25, 2023 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
master merge ready PR will be merged after a few days if there are no objections
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants