Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Cannot Reproduce
-
Affects Version/s: 4.6.6
-
Fix Version/s: None
-
Component/s: CiviCRM API
-
Labels:
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
Suppose you have a custom datetime field on contacts, and you want to search all contacts that have a date in this field that is earlier than some given date, like e.g.
$result = civicrm_api3('Contact', 'get', array( 'sequential' => 1, 'custom_2' => array('<=' => "2015-08-31"), ));
Then you get this unrelated error message:
{ "is_error": 1, "error_message": "The field 'custom_2' has no associated option list." }
I am aware of the fact that the custom fields you provide to the api are currently ignored (CRM-16036), but this issue seems to be unrelated.
UPDATE: searching on custom fields does work for contacts.
I will upload a unit test in a minute.