Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.5, 4.6, 4.7
-
Fix Version/s: 4.7.25
-
Component/s: CiviCase, CiviCRM API
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
When using the API to create a new Case you can pass in custom data parameters to populate associated custom data groups/fields, but they are completely ignored at the API level.
see: master@api/v3/Case.php:84
Only a select group of fields are sent through to the BAO. There is already a todo saying this needs to be cleaned up, but I couldn't find a Jira issue for it.
I think the best solution is to properly fix the way that parameters are passed into the BAO from the API, but this may cause problems elsewhere if data is being passed directly from a form into the API as it seems to be in some places. In my opinion an interim step would be to add 'custom' with a reasonable default to the newParams list to allow the creation of Cases with their associated custom data while we sort out the rest of that function.
With a little bit of input on the best approach I'll be happy to submit the patch myself.