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

APIv4 - Add export action for managed entities #22014

Merged
merged 1 commit into from
Nov 27, 2021

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Nov 9, 2021

Overview

New APIv4 action generates an exportable array suitable for use in a .mgd.php file.

Comments

.mgd.php files are tricky to hand-write; so this action is a nice time-saver and human-error-saver. But the really useful part of this api action is that it collects all references into a single array of managed entities. For example, exporting a SavedSearch will automatically include the search displays:

image

@civibot
Copy link

civibot bot commented Nov 9, 2021

(Standard links)

@civibot civibot bot added the master label Nov 9, 2021
@colemanw colemanw marked this pull request as draft November 9, 2021 20:24
@colemanw colemanw changed the title APIv4 - Add export action to managed entities APIv4 - Add export action for managed entities Nov 9, 2021
@colemanw colemanw force-pushed the apiExport branch 2 times, most recently from 61e591b to 6f5ae83 Compare November 10, 2021 20:35
@colemanw colemanw marked this pull request as ready for review November 10, 2021 20:35
@agileware-justin
Copy link
Contributor

👍 up for the ability to export configuration.

@colemanw colemanw force-pushed the apiExport branch 6 times, most recently from 70eeb99 to 3813c21 Compare November 18, 2021 23:04
Copy link
Contributor

@kurund kurund left a comment

Choose a reason for hiding this comment

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

Export functionality is working as expected. Here is what I did:

  • Created a new 'Saved Search' using Search kit and then exported it.
  • Created new extension on a separate CiviCRM instance and added exported saved search to SavedSearch.mgd.php
  • After installing the extension saved search was correctly created and listed under packaged searches.

Good to merge.

This action generates an exportable array suitable for use in a .mgd.php file.
@colemanw
Copy link
Member Author

Thanks @agileware-justin and @kurund. Merging based on review.

@colemanw colemanw merged commit 475f7e9 into civicrm:master Nov 27, 2021
@colemanw colemanw deleted the apiExport branch November 27, 2021 06:34
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.

3 participants