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

Event 'delete participant' batch operation can show incorrect count

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5
    • Fix Version/s: 4.7
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      -Summary-
      When deleting participants using the batch operation 'Delete participants' and using the 'Delete this participant record along with associated participant record(s).' option, the count for deleted participants in the confirmation message can be incorrect

      -Steps to recreate-

      • Book 2 people into an event (a primary booker and one guest)
      • View the participants page for the event
      • Select both people and choose the 'Delete particpants' batch action
      • Select 'Delete this participant record along with associated participant record(s)'
      • Confirm
      • Note that the confirmation message shows 'Deleted: 3 - Selected: 2'

      -Issue source-
      The secondary participants are being counted twice: once because the function is deleting participants associated with the primary participant, and again because we have explicitly asked for the secondary participant to be deleted.

      This is happening in \CRM\Event\Form\Task\Delete.php around line 118 (https://github.com/civicrm/civicrm-core/blob/master/CRM/Event/Form/Task/Delete.php#L118)

      -Solution-
      The 'deleted' count should only increment once for each unique participant record, or once for each participant that was successfully deleted (if we can check that).

        Attachments

          Activity

            People

            • Assignee:
              rohan1990 Rohan Ramesh Katkar
              Reporter:
              john John K.
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: