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

Inconsistency in return from ("GroupContact", "create")

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.2.0
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      Per discussion on civicrm-api mailing list:

      I noticed that a successful ("EntityTag","create") returns:
      array( 'is_error' => 0,
      'not_added' => 0,
      'added' => 1,
      'total_count' => 1,
      );

      While a successful ("GroupContact", "create") returns:
      array( 'is_error' => 0,
      'values' => array(
      'not_added' => 0,
      'added' => 1,
      'total_count' => 1,
      ),
      );

      Notice the extra "values" array, and that it does not contain the entity created like in all other calls to the API. This should be adjusted to match the return from ("EntityTag", "create").

        Attachments

        1. GroupContact.php.patch
          0.8 kB
          Nicolas Ganivet
        2. GroupContactCreate.php.patch
          0.6 kB
          Nicolas Ganivet
        3. GroupContactDelete.php.patch
          0.6 kB
          Nicolas Ganivet
        4. GroupContactTest.php.patch
          2 kB
          Nicolas Ganivet

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              nganivet Nicolas Ganivet
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 30 minutes
                30m
                Remaining:
                Remaining Estimate - 30 minutes
                30m
                Logged:
                Time Spent - Not Specified
                Not Specified