-
-
Notifications
You must be signed in to change notification settings - Fork 824
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 managed entity functionality #21955
Conversation
(Standard links)
|
retest this please |
error in building test site
|
The unit tests I spot-checked locally all passed. But this PR appears to cause a crash during install; I'm quite puzzled as to why. |
@colemanw it seems it is failing on this line now https://github.com/civicrm/civicrm-core/pull/21955/files#diff-701bf6b7f7ec53672fcbc98be0650bdbb881e0fdd427ba4eb3474e4e1751d691R633 maybe something to do with Entity Permissions? |
This new "ManagedEntity" trait provides 2 extra fields and a Revert action to facilitate UIs which show the managed state and a revert button, similar to the AfformAdmin UI.
bfea6ed
to
9626d0a
Compare
I broke the offending commit into its own PR to facilitate tracking down that test failure. This PR is now passing except for some unrelated failure noise from Jenkins. Anyone want to give it a merge? |
Test fails unrelated and this seems fine to me merging |
Overview
Provides extra API functionality which will be used by the SearchKit UI to display searches as "packaged" with a "Revert" button.
Technical Details
This new "ManagedEntity" trait provides 2 extra fields (
has_base
&base_module
) and aRevert
action to facilitate UIs which show the managed state and a revert button, similar to the AfformAdmin UI. Any DAO-based entity can opt-in to this functionality simply by using the trait.The
base_module
field provides the name of the extension in which an entity is packaged. It will be useful in the Afform UI as well, so I implemented a version of that field in theAfform::get
API here: #21960.Comments
This PR includes test for the new fields & action, and existing API test coverage is good.