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

Pledge payments are not being updated when contributions are imported

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.4.0
    • Fix Version/s: 3.4.1
    • Component/s: CiviContribute
    • Labels:
      None

      Description

      This is reproducible on the 3.4.0 Drupal Demo

      When I attempt to import the attached CSV file to the demo site, the contribution is added, but the contribution is not marked as a pledge payment, even though the amounts etc match the next payment. The import screen suggests that both the contribution and the payment were successfully added.

      The attached patch fixes the problem.

      The problem is due to a difference between API v2 and v3. The Contribution import parser calls the API function ...

      $newContribution = civicrm_api('contribution', 'format_create', $formatted);

      The API call eventually invokes CRM_Contribute_BAO_Contribution::create(). On line 226 of that file the $params argument is modified ...

      $params['contribution_id'] = $contribution->id;

      In v2, that change to the array filters back to the caller of the API (ie, $formatted), but this doesn't happen in v3.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              ken Ken West
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: