-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Allow to specify API4 job entity in Edit Job form #27849
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
@mattwire in other forms we've made this an Autocomplete widget and that works well, but I guess you need to be able to expose both v3 and v4 entities here? |
Right, I didn't look into any clever ways of doing this and just went for the simplest change that benefits from removing some js from the template. I think that scheduled jobs could do with a bit of work on the schema maybe to include a version field and make the params less ugly (\n separated string!). |
Ok, well that javascript is indeed ugly so this gives us a blanker slate to work with for future improvements. I do note that someone cleverly added validation recently, so for lack of an autocomplete at least we do give a form-error if entity/action/version don't match up. |
Great, thanks @mattwire Now we just need to know how to specify parameters like |
@artfulrobot Internally it call civicrm_api4() so should accept the "traditional" notation from the api explorer (you need to specify version=4 as well). Maybe give it a test and document :-) I can't find the example I did at the moment. |
Overview
This allows you to specify an API4 entity in Edit Job form.
Previously there was some nice complicated javascript to hide the actual fields and give you a dropdown list and a fancy concatenated function name that doesn't mean anything... Removed all that and exposed the API entity and action text fields. I'm sure someone setting up a scheduled job can be trusted to type in those by hand.
Before
After
Technical Details
With this change you can setup and run an API4 scheduled job by putting "version=4" in the parameters.
Comments