CRM-12013 Expand Participant data search to include Contribution fields

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.0
    • Component/s: CiviEvent, Core CiviCRM
    • Labels:
      None

      Description

      In 3.4 exporting participant data used to include contribution fields such as "total amount" and "payment method" (cash, check, credit, etc). That functionality disappeared in 4.2 and we would like it back.

      Allen Shaw has created a patch to do just that.

        Attachments

          Activity

          [CRM-12013] Expand Participant data search to include Contribution fields
          Donald A. Lobo added a comment -


          We'll need to see a patch for this in a few days for this to be included in 4.3. For now, punting it to 4.4, we'll pull it bck in if the patch arrives

          Stoob added a comment -

          From TwoMice...

          FYI, I just submitted a pull request for this fix. https://github.com/civicrm/civicrm-core/pull/65

          Will this suffice?

          Allen Shaw added a comment -

          I'm pretty sure the patch was pulled in by Kurund already. https://github.com/civicrm/civicrm-core/pull/65 Can we mark it back to 4.4?

          Allen Shaw added a comment -

          Er, I mean: can we mark it back to 4.3?

          Donald A. Lobo added a comment -

          yes, marked back. can u qa master and close it if it works

          Allen Shaw added a comment -

          What would be the appropriate QA procedure?

          David Greenberg added a comment -

          Allen - I did quick test on my master checkout and hit a fatal error, so looks like a bug has been introduced. Steps to recreate:

          • Find Participants, select a bunch of them (I had at least one event registration w/ price set that had 2 fields / so 2 line_items, not sure if that matters).
          • Select participants and click Export
          • Click 'Select fields for export'
          • Selected the following:
            Individual : Last Name
            Participant: Contribution Status
            Participant : Total Amount
            Participant : Transaction ID
            Participant : Payment Instrument
          • Click Export, Fatal error ...

          Note that the 'Export Primary fields' flow worked w/o errors and gave me all the new contribution-related columns / data.

          Once you've got this figured out, the expected QA is to extend the Web test suite to cover this new functionality. I think easiest might be to add a new method to WebTest_Event_ParticipantSearchTest. There's an example of export testing via Web test in WebTest_Export_ContactTest. (If easier u can just create a new test in that Export directory for Participant).

          Donald A. Lobo added a comment -


          twomice made a PR which has been pulled into master that fixes it. Dave: Can u QA please

          David Greenberg added a comment -

          Select Fields to Export is now working properly (including saving and reloading saved mappings). However I'm getting these notices now after doing export and clicking Done - seems like the $paymentHeaders var usage has changed or ???
          -----------
          Notice: Undefined variable: paymentHeaders in CRM_Export_BAO_Export::exportComponents() (line 590 of /Users/dgg/git/crm_v4.3/CRM/Export/BAO/Export.php).
          Warning: array_keys() expects parameter 1 to be array, null given in CRM_Export_BAO_Export::exportComponents() (line 590 of /Users/dgg/git/crm_v4.3/CRM/Export/BAO/Export.php).
          Warning: array_fill_keys() expects parameter 1 to be array, null given in CRM_Export_BAO_Export::exportComponents() (line 590 of /Users/dgg/git/crm_v4.3/CRM/Export/BAO/Export.php).

          Allen Shaw added a comment -

          Argh, sorry I did not have notices turned on. Yes, there's been a change to how $paymentHeaders array is built. I've fixed it by initializing the array properly as an empty array. The pull request is here: https://github.com/civicrm/civicrm-core/pull/153

          Dave, can I ask you to QA this again?

          David Greenberg added a comment -

          looks good now.

            People

            • Assignee:
              David Greenberg
              Reporter:
              Stoob

              Dates

              • Created:
                Updated:
                Resolved: