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

API input functions should accept the return values of output functions

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.1.5, 3.1.6, 3.2
    • Fix Version/s: 4.3.0
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      This is a meta issue of which CRM-6639 is one example.

      The arrays returns by most CIviCRM API 'get' or 'search' functions are not valid parameters for the corresponding add/create functions. Frequently this is because date formats are different. Sometimes key names are different. Sometimes there is inconsistency whether a numeric ID or string label is expected.

      The result is that large amount of 'massaging code' is required to do things like copying an existing record.

      Similar inconsistencies exist with the 'objects' (sometimes arrays) passed to the pre/post hooks. E.g., the Contribution array passed to hook_civicrm_pre for a contrbituion is not a valid array for civicrm_contribute_create().

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              mchapman2000 Matt Chapman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: