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

api.UFJoin.create reports mismatching ID in results

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.6.9
    • Fix Version/s: None
    • Component/s: CiviCRM API
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      Example API call:

      $result = civicrm_api3('UFJoin', 'create', array(
        'sequential' => 1,
        'module' => "CiviVolunteer",
        'weight' => 1,
        'uf_group_id' => "new_organization",
        'entity_id' => 1,
        'entity_table' => "civicrm_volunteer_project",
      ));
      

      ... gives result:

      {
          "is_error": 0,
          "version": 3,
          "count": 1,
          "id": 0,
          "values": [
              {
                  "id": "14",
                  "is_active": "",
                  "module": "CiviVolunteer",
                  "entity_table": "civicrm_volunteer_project",
                  "entity_id": "1",
                  "weight": "1",
                  "uf_group_id": "5",
                  "module_data": ""
              }
          ]
      }
      

      I would expect $result['id'] and $result['values'][0]['id'] to match.

      I suspect this issue is present in 4.7 as well but haven't tested it.

        Attachments

          Activity

            People

            • Assignee:
              saurabh.batra Saurabh Batra
              Reporter:
              pittstains Frank J. Gómez
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: