Page MenuHomePhabricator

Implement ability for organizer to delete registration
Closed, ResolvedPublic

Description

As an organizer, I want to be able to delete event registration, so that I can have full management capabilities of my event and I can make changes if the event is no longer occurring or if an issue arises.

Acceptance Criteria:

  • The organizer should be able to delete registration
  • It is recommended that is a special page (Special:DeleteRegistration) or it can be on the same page to edit registration --> we will need feedback from Gregory to determine the complete user flow

Todo

  • Determine who can delete a registration (i.e., the organizer, but also admins)
  • What happens if you create a registration, delete it, and then try to create a new one for the same page (since a page can only have a single registration)

Event Timeline

@gonyeahialam @CKMIE89: Hello! What do you recommend as the user flow for how an organizer can delete registration that they have created for an event page? For example, an organizer thought they wanted to add registration, but they decided they don't need it. Thanks in advance!

If Event registration is no longer needed, the flow can be as simple as clicking Delete Event and the Organizers get a popup to confirm their action and inform them of the consequence. Once they confirm the event is deleted.
@ifried @Daimona. I can work on the design for this if there are no other concerns.

@gonyeahialam I think this could be a pop-up that also leads to a special page for registration delation (for people who have errors or no-JS issues). But I wanted to check in with @Daimona to see what he thinks makes sense from a technical perspective. Thanks in advance to both of you!

@gonyeahialam I think this could be a pop-up that also leads to a special page for registration delation (for people who have errors or no-JS issues). But I wanted to check in with @Daimona to see what he thinks makes sense from a technical perspective. Thanks in advance to both of you!

I think it makes sense to have a button that opens a confirmation popup, and the registration is deleted immediately if you confirm. If there are errors or you disabled JavaScript, clicking the button will send you to the special page instead. @ifried I can work on this now if you want (in which case I'll also move this task to the current sprint).

@Daimona Thank you; sounds great! Yes, we can move this ticket to the current sprint. Do you need any design help from Gregory on how the pop-up should look? Or do we have an existing pop-up in OOUI that we can use, so you would just need the text for the pop-up?

@Daimona Thank you; sounds great! Yes, we can move this ticket to the current sprint. Do you need any design help from Gregory on how the pop-up should look? Or do we have an existing pop-up in OOUI that we can use, so you would just need the text for the pop-up?

Since we already have some components, I think it would look fairly standard. I'm going to implement it now, and then we can discuss the details while looking at the demo.

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

[mediawiki/extensions/CampaignEvents@master] Implement frontend for deleting an event registration

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

The patch above implements the special page for deleting a registration. The popup cannot be implemented yet because we still don't have the Special:EventRegistration page and the kebab menu on Special:MyEvents.

@ifried @Daimona @ldelench_wmf The prototype has been updated to show the flow for deleting an event(with placeholder copy)

Delete Event from List of Events

Delete event.gif (363ร—600 px, 217 KB)

Delete Event from Event details page

Delete Event from Event detail.gif (363ร—600 px, 183 KB)

Change 801407 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Implement frontend for deleting an event registration

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

QA notes

  • The interface can be accessed at Special:DeleteEventRegistration/123 where 123 is the ID of the registration you want to delete
  • The popups shown in the gifs above are not part of this task
  • Note that an API endpoint for deleting registrations already existed before this task, and it's already listed in the big QA task: T305708. This could be an occasion to make sure that the behaviour of the endpoint is consistent with the UI.
Specs
  • Ensure that the page displays appropriate errors when:
    • No ID is passed
    • Some invalid string is passed as ID
    • The ID is valid but there's no event with that ID
    • An event with that ID exists, but it's already deleted
  • Verify that deletion works correctly
  • Verify the permission checks:
    • If you are NOT an admin and you did NOT create the event page, you canNOT delete the event
    • If you are NOT an admin but you did create the event page, you can delete the event
    • If you are an admin, you can delete the event regardless of whether you created the event page
    • If you are blocked, you can't delete the registration regardless of the above
  • Ensure the following for GET endpoints:
    • Deleted events are included when listing registrations by organizer or participant, but there's an additional "event_deleted": true key.
    • The lists of participants and organizers are still returned for deleted events (this could change in the future though)
    • If you try to get the details of that specific registration, you get a 404.
  • Ensure that participants cannot register on unregister for deleted registrations (either via UI or API)
  • Ensure that deleted registrations cannot be edited (either via Special:EditEventRegistration or the API endpoint)
  • Make sure that it's not possible to create a new registration for a page that already has a deleted registration (there should be some error message), either via UI or API

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

[mediawiki/extensions/CampaignEvents@master] Fix behaviour of several operations with deleted registrations

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

I actually realized that some of the specs listed above wouldn't pass, and the patch above should fix that.

Change 803900 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Fix behaviour of several operations with deleted registrations

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

All AC and testing notes pass in UI and API. one note:

When deleting a registration and then attempting to re-register that event, the following message is given.

The given event page already has another registration associated.

This is true, but to the end user I feel it is confusing. That copy could be changed to be more clear, to show that the event has been deleted and can not be re registered.

I talked with @Daimona about this, but wanted to document it here for you as well @ifried

When deleting a registration and then attempting to re-register that event, the following message is given.

The given event page already has another registration associated.

This is true, but to the end user I feel it is confusing. That copy could be changed to be more clear, to show that the event has been deleted and can not be re registered.

I agree, and we can easily change the message for deleted registration, I would just need to know what the message should be.

@Daimona and @vaughnwalters I recommend the following messages:

  • When registration already exists (and is not deleted): The given event page already has an associated registration.
  • When registration has been deleted: You cannot enable registration because registration has been deleted from this event page.

@Daimona and @vaughnwalters I recommend the following messages:

  • When registration has been deleted: You cannot enable registration because registration has been deleted from this event page.

@ifried Sorry for not noticing this earlier, but the error message in question could potentially be shown in other circumstances, and not only when trying to enable the registration. Do you think we could use another message that does not mention enabling registration?

@Daimona, does this work?:

You cannot complete the action because the event registration has been deleted.

@Daimona, does this work?:

You cannot complete the action because the event registration has been deleted.

It's better, but I'm also unsure if the error could only happen when the user is performing an action. Do you think something like:

The given event page already has an associated registration that was deleted in the past

would work, since this is temporary anyway?

Okay, slight language tweak:

The given event page already has an associated registration that was deleted.

Okay, slight language tweak:

The given event page already has an associated registration that was deleted.

Thank you!

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

[mediawiki/extensions/CampaignEvents@master] Use different error when the existing registration for a page is deleted

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

Hi, just jumping in here, but when the user deletes the registration, they are informed they will not be able to re-activate it?

In which case, I think to make things even clearer we should inform them here again that this was a permanent action that cannot be reversed.

The given event page already has an associated registration that was deleted, this action is permanent/irreversible.

Or something like that.

Change 806440 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Use different error when the existing registration for a page is deleted

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

Delete message when event has already been deleted now reads : This event registration was already deleted.

@CKMIE89 Yes, they are informed that This action cannot be reverted. when they delete the registration.

@Daimona want to take this back into in progress?

Hi, just jumping in here, but when the user deletes the registration, they are informed they will not be able to re-activate it?

In which case, I think to make things even clearer we should inform them here again that this was a permanent action that cannot be reversed.

The given event page already has an associated registration that was deleted, this action is permanent/irreversible.

Or something like that.

I'm not sure if it's worth mentioning it again, especially because we plan to add the possibility to restore deleted registrations at some point.

I have tested deleting registration, and it works as expected (see screenshots below). For this reason, I'm marking this as Done.

Screen Shot 2022-07-13 at 6.04.34 PM.png (888ร—1 px, 120 KB)

Screen Shot 2022-07-13 at 6.04.38 PM.png (864ร—1 px, 122 KB)

Screen Shot 2022-07-13 at 6.04.45 PM.png (682ร—2 px, 87 KB)