Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event#30 - don't allow multiple waitlist registrations #16358

Merged
merged 1 commit into from
Jan 24, 2020

Conversation

MegaphoneJon
Copy link
Contributor

@MegaphoneJon MegaphoneJon commented Jan 23, 2020

https://lab.civicrm.org/dev/event/issues/30

Overview

CRM-2426 prevents multiple front-end registrations of an event participant whose status is "Counted", but allows someone to register for the waitlist multiple times.

Before

Waitlisted users are allowed to generate as many waitlist entries as they like.

After

Waitlisted users get the same feedback as "counted" users when attempting to re-register.

Technical Details

The Event Participant Status is_counted and class both try to capture different ways of grouping statuses, but "On waitlist" is and will always be a special case when determining whether a person is registered.

@civibot civibot bot added the master label Jan 23, 2020
@civibot
Copy link

civibot bot commented Jan 23, 2020

(Standard links)

@eileenmcnaughton
Copy link
Contributor

test this please

@eileenmcnaughton
Copy link
Contributor

@MegaphoneJon I tested this & was able to replicate it. It has a test & change seems sensible.

However, I do think the message you get if you are already waitlisted is a bit confusing - ie

Screen Shot 2020-01-24 at 11 31 14 AM

People could think they have already been accepted?

@MegaphoneJon
Copy link
Contributor Author

I considered that. I feel like the word "registered" is overloaded here - arguably any participant record represents a "registration", but it's also a participant status.

I think we're overly sensitive to the second definition, while the first is more colloquial, but there's no harm in changing the word "registered" to "waitlisted" here in that message.

@eileenmcnaughton
Copy link
Contributor

@MegaphoneJon I'm OK with merging this as an improvement & leaving that for more pondering

@MegaphoneJon
Copy link
Contributor Author

No need :)

@yashodha
Copy link
Contributor

@MegaphoneJon @eileenmcnaughton looks good, merging this as per consensus

@yashodha yashodha merged commit af58774 into civicrm:master Jan 24, 2020
@@ -1196,8 +1197,9 @@ public static function checkRegistration($fields, $form, $isAdditional = FALSE)
if ($form->_pcpId) {
$registerUrl .= '&pcpId=' . $form->_pcpId;
}

$status = ts("It looks like you are already registered for this event. If you want to change your registration, or you feel that you've received this message in error, please contact the site administrator.") . ' ' . ts('You can also <a href="%1">register another participant</a>.', [1 => $registerUrl]);
$registrationType = (CRM_Event_PseudoConstant::getKey('CRM_Event_BAO_Participant', 'participant_status_id', 'On waitlist') == $participant->status_id) ? 'waitlisted' : 'registered';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing this late, but this is a good example of an incorrect use of "ts". It's impossible to translate a string like this, even if the individual words were in "ts" (because of grammar).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants