Page MenuHomePhabricator

Create fields validation for the Unregister Participant API
Closed, ResolvedPublic

Description

As a Dev, I want to create the validations to the fields: user_id and event_registration_id

Acceptance Criteria:

event_registration_id:

  • Must be set
  • Must be an integer
  • Must be a valid event registration id
  • The end date must not be in the past
  • The status does not have to be 'open'

If fields validation fails we must return the reason of the error in the response:

  • Invalid registration_id
  • Registration is past

Participants should be able to unregister if the event is closed

  • Because: they may no longer be able to attend the event (so they should be able to update their status)

Participants should not able to unregister if the event has ended

  • Because: organizer should have a complete list of who intended to attend, whether or not they did

Event Timeline

cmelo updated the task description. (Show Details)
cmelo updated the task description. (Show Details)
cmelo updated the task description. (Show Details)
cmelo updated the task description. (Show Details)

@cmelo @JCarvalho @ifried What about the last two items? Should users be able to unregister if the registration is not open or has already ended? (My answer would be no to both questions)

Hi @Daimona, yes I agree with you, the participant can not register in this two cases.

Change 772845 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Create a REST endpoint for unregistering as a participant

https://gerrit.wikimedia.org/r/772845

The question is whether participants should be able to unregister for an event that is closed in status or has already ended. My instinct is:

  • If event status is closed: At first, I thought 'no,' but as I have thought about it more, I think 'yes.' This is because the user may not be able to attend, and this is important information for the organizer to know. Also, if there is a quota for the number of participants, they can give up their seat so someone else can join.
  • If event has ended: No. I think it is useful to capture this for tracking purposes and it can later be compared against who made edits or who showed up in analytics for the organizer. But I am open to ideas/suggestions, since I would like to think about this a bit more.

What do you think, @Iflorez, @gonyeahialam, @CKMIE89, @Astinson, and @IBrazal? Thanks in advance!

I am talking to @fnartey, and he is saying:

  • If it is automatic closing since the quota of participants has been reached, the participant should be able to leave and then registration is open again until the quota is filled again.
  • If is manually closed by the organizer, then the participant should only be able to leave by contacting the organizer and having them remove them.
  • If it is closed due to event date passing, they should not be able to leave.

Reading this I'm wondering if some kind of "waiting list" or "expression of interest" is possible, if an event is full but a "seat" opens up.... (bullet point 1 & 2 from @fnartey comments.)
You could then be automatically registered, or receive some kind of message informing you that registration is possible again?

Thinking about this again, I agree with the comments above. However, number of seats or automatic closing are not V0, so for now I'd stick with disallowing the unregistration only if the event has ended (but not if it's closed). What do y'all think?

Thinking about this again, I agree with the comments above. However, number of seats or automatic closing are not V0, so for now I'd stick with disallowing the unregistration only if the event has ended (but not if it's closed). What do y'all think?

Hi @Daimona I think it is ok for V0, thank you!

Thinking about this again, I agree with the comments above. However, number of seats or automatic closing are not V0, so for now I'd stick with disallowing the unregistration only if the event has ended (but not if it's closed). What do y'all think?

I concur with this

Yup, makes sense, @Daimona. We can hash out details of handling participant quotas in V2 or later. For now, the simple rule of allowing participants to unregister if the event is closed and NOT allowing participants to unregister if the event has ended makes sense. I will add this information to the Acceptance Criteria. Thanks!

The question is whether participants should be able to unregister for an event that is closed in status or has already ended. My instinct is:

  • If event status is closed: At first, I thought 'no,' but as I have thought about it more, I think 'yes.' This is because the user may not be able to attend, and this is important information for the organizer to know. Also, if there is a quota for the number of participants, they can give up their seat so someone else can join.
  • If event has ended: No. I think it is useful to capture this for tracking purposes and it can later be compared against who made edits or who showed up in analytics for the organizer. But I am open to ideas/suggestions, since I would like to think about this a bit more.

What do you think, @Iflorez, @gonyeahialam, @CKMIE89, @Astinson, and @IBrazal? Thanks in advance!

I agree with this

Change 772845 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Create a REST endpoint for unregistering as a participant

https://gerrit.wikimedia.org/r/772845

Since this is not user-facing, I will mark this as Done. Meanwhile, we will test the experience of error handling from the user perspective in T305264 (details TBD).