-
-
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
Add defaults for APIv4 Case create #20306
Conversation
- default Case Creator = current user - default Case start date = now
(Standard links)
|
Agree this looks sensible. |
It seems Coleman was more impressed than jenkins api\v4\Entity\ConformanceTest::testConformance with data set "Case" ('Case') /home/jenkins/bknix-dfl/build/core-20306-252nq/web/sites/all/modules/civicrm/CRM/Core/Error.php:943 |
I don't think the conformance test creates a logged-in user. |
@colemanw so it IS possible via the cli for there to be no logged in user so this should not db-error without one |
I think the API works fine, it's just a problem with the test. The conformance test assumes that if a field has a default value, it shouldn't fill that field. But if the default is |
Now that creator_id has a default value it can also be marked as required. Updating TestCreationParameterProvider to supply a FK before the default value fixes the problem with user_contact_id in a test with no logged-in user.
I've pushed up a fix to the test. |
Overview
Add defaults for APIv4 Case.create:
Before
No defaults for Case Creator and Case Start Date
After
Sensible defaults for Case Creator and Case Start Date
Technical Details
Comments