Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-13503 CiviHR - Cross-Cutting - Framework (other)
  3. CRM-13520

APIv3 returns string "null" after calling "create" with empty string

    Details

    • Type: Sub-task
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.0
    • Fix Version/s: None
    • Component/s: CiviCRM API, CiviHR
    • Labels:
      None

      Description

      When calling the "create" API, one receives an updated record as the response. However, the response is malformed because any field that contained an empty-string ('') is converted to string "null".

      See example at:

      https://github.com/civicrm/civihr/commit/030a14c1ba48b945ac4f3d4ce869129679460e28#L0R53

      In the CiviHR Job UI, this has the effect of making it impossible to save and then re-save a form.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                timotten Tim Otten
                Reporter:
                timotten Tim Otten
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 6 hours
                  6h
                  Remaining:
                  Time Spent - 4 hours Remaining Estimate - 2 hours
                  2h
                  Logged:
                  Time Spent - 4 hours Remaining Estimate - 2 hours
                  4h