Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-16581

API and checking if a custom field is empty is ignored

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.3
    • Fix Version/s: 4.6.6, 4.7
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      In the function &fixWhereValues() Line1538 of CRMContact/BAO/Query.php does a CRM_Utils_System::isNull() check on the parameters for the API request.

      If an API parameter is something like != '' or > '' or >= '' that parameter is ignored meaning that the API can't be used to check if (custom?) fields are empty.

      This is an issue because sets of custom fields become empty strings when only one/some of them are set.

      Solution will probably require that empty strings are not ignored and are handled appropriately when creating the query.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                monish.deb Monish Deb
                Reporter:
                rocxa Alex C
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: