CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Pending from wait list - confirmation email link shows event is full
Pages: [1]

Author Topic: Pending from wait list - confirmation email link shows event is full  (Read 1056 times)

cwyant

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.14
  • MySQL version: 5.1.65-cll
  • PHP version: 5.3.18
Pending from wait list - confirmation email link shows event is full
November 28, 2012, 02:28:44 pm
CiviCRM 4.2.6, Drupal 7.15

I'm setting up events with waiting lists. I'm not sure if this is a bug or a configuration issue. Example:

Event 1 has max attendance set at 5. Five people sign up, one on waiting list. When one person cancels and a person is moved from "on waiting list" to "pending", and they click the link to "confirm your registration" from their email, the event is shown as full ("oops" error message). This happens even if I change participant status "pending" from "counted" to "not counted".

There are no fees involved, and all of these are single registrations, not multiple people.

I changed line 118 in CRM/Event/Form/Registration/ParticipantConfirm.php

//$requireSpace = 1 + count($additonalIds);
 $requireSpace = count($additonalIds);

and now it works fine. Maybe there is a problem with "pending" status being counted, or in calculating the required space? Any help would be appreciated. Thanks!


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Pending from wait list - confirmation email link shows event is full
November 28, 2012, 06:04:36 pm
Looking at that code, it seems like the value in $emptySeats might be incorrect. Based on your situation below I think that value should be 1 (1 empty seat). The value of count($additionalIds) s/b 0 since that array represents the additional participants requested by the primary participant. Would be great if you could instrument / debug this call and see what's happening:

CRM_Event_BAO_Participant::pendingToConfirmSpaces($this->_eventId);
Protect your investment in CiviCRM by  becoming a Member!

cwyant

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.14
  • MySQL version: 5.1.65-cll
  • PHP version: 5.3.18
Re: Pending from wait list - confirmation email link shows event is full
November 30, 2012, 09:32:15 am
This is pretty hacky, and I don't really know what I'm doing, but I looked at CRM/Event/BAO/Participant.php around line 567. It looked like it wasn't taking into account 'Pending' statuses. Here's my hacky fix:

    $positiveStatuses = CRM_Event_PseudoConstant::participantStatus(NULL, "class = 'Positive'");
    $pendingStatuses = CRM_Event_PseudoConstant::participantStatus(NULL, "class = 'Pending'");
    $statusIds = '(' . implode(',', array_keys($positiveStatuses)) . ')';
    $statusPending = '(' . implode(',', array_keys($pendingStatuses)) . ')';

    $query = "
  SELECT  count(participant.id) as registered,
          civicrm_event.max_participants
    FROM  civicrm_participant participant, civicrm_event
   WHERE  participant.event_id = {$eventId}
     AND  civicrm_event.id = participant.event_id
     AND  participant.status_id IN {$statusIds}
     AND  participant.status_id IN {$statusPending}
GROUP BY  participant.event_id
";

Seems to work as it should for now. I'm sure someone can come up with a more elegant fix.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Pending from wait list - confirmation email link shows event is full
November 30, 2012, 10:58:51 am
Thanks for the report back. I've asked Yashodha to take a look and verify the bug / fix next week.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Pending from wait list - confirmation email link shows event is full

This forum was archived on 2017-11-26.