Page MenuHomePhabricator

Add ability to remove participants from an event
Closed, ResolvedPublic3 Estimated Story Points

Description

As an organizer, I want to be able to remove usernames from the participants list, so that I can prevent abuse or bad actors and so that I can have full control over the management of my event.

Resources:

Acceptance Criteria:

  • The organizer of an event should be able to remove one or more participants from the event
  • If the participant is removed, it is a soft delete in the system
  • The user flow to remove participants should be on the EventDetails page and only viewable to organizers. It should function in the following way:
    • The organizer selects one or more participants via checkboxes to the left of the username
    • The organizer then clicks on the "remove" link/trash icon
    • The organizer sees a pop-up that states: "Are you sure you want to remove these participants?"
      • The organizer can click can the grey "Cancel" button and the pop-up disappears and no participants are removed
      • The organizer can click the red "Remove" button and the participants are soft-deleted and no longer viewable to anyone who views the events (organizers, participants, or general Wikimedia users)
  • The new API endpoint is documented on mw.org

Visual Examples:

Screen Shot 2022-06-09 at 8.18.51 AM.png (1×2 px, 205 KB)

Screen Shot 2022-06-09 at 8.19.02 AM.png (1×2 px, 222 KB)

Event Timeline

cmelo renamed this task from Add ability to remove participants from an event on the Participants to Add ability to remove participants from an event.Jun 6 2022, 1:25 PM
cmelo created this task.

Change 806967 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/CampaignEvents@master] Adding the ability to remove participants from event

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

Change 813227 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/CampaignEvents@master] Add the ability to remove participants

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

Change 813227 abandoned by Cmelo:

[mediawiki/extensions/CampaignEvents@master] Add the ability to remove participants

Reason:

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

Daimona subscribed.

@cmelo As a reminder, we should document the new endpoint on mw.org. I've updated the AC to reflect that.

@cmelo As a reminder, we should document the new endpoint on mw.org. I've updated the AC to reflect that.

Not moving the task to QA as this is still to do.

Change 806967 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add the ability to remove participants from event

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

Moving back per

@cmelo As a reminder, we should document the new endpoint on mw.org. I've updated the AC to reflect that.

Not moving the task to QA as this is still to do.

✅ removing one participant

Screen Recording 2022-08-10 at 2.38.59 PM.mov-467DDF65-8A60-4AFC-82D0-E790D7E9C66A.gif (472×720 px, 1 MB)


✅ removing multiple participants

remove one participant.mov-D5F84CF3-EEC0-4C82-AD86-4489301624C5.gif (536×720 px, 1 MB)


✅ removing all participants

delete all users.mov-2F9E9E78-3B47-42D2-ADDD-A59B5365BD95.gif (536×720 px, 1 MB)


✅ removing participants with API

api.gif (626×720 px, 336 KB)


One question for you @cmelo per this AC:

If the participant is removed, it is a soft delete in the system

Where can I find a record of the user being soft deleted? The removed users are not listed in the List Participants of a registration endpoint json that is returned. There is also no record of the deleted event in the List all registrations a participant has registered for endpoint json that is returned either. When users are removed is it actually currently a hard delete from the DB?

In the gif below I deleted all of the users of the event (I meant to just delete one user, but made a typo and accidentally deleted all of them) -- but after deleting them I can find no soft delete record of any of them related to the event. Is the soft delete AC still applicable?

Screen Recording 2022-08-11 at 5.26.46 PM.mov-05902E49-4604-4AA8-965D-933704908950.gif (684×720 px, 2 MB)

Where can I find a record of the user being soft deleted?

Long story short, nowhere. The deletion is indeed soft, but the interface doesn't allow you to view deleted entries or restore them (although this may be implemented in later versions). If you do want to verify that the DB entries are still there, you'll have to manually query the DB, e.g., select * from ce_participants where cep_event_id=123.

Okay thank you @Daimona I was able to find all of the soft deleted users in the DB using that query. Moving this to product sign off as all AC is met.

Screen Shot 2022-08-12 at 11.23.07 AM.png (1×1 px, 479 KB)

vyuen changed the task status from Open to In Progress.Aug 25 2022, 12:50 PM
ifried closed this task as Resolved.EditedAug 30 2022, 5:00 PM

I have tested removing a participant (see screenshot example below) for this ticket, along with several other instances of removing participants in various demos. It is working as expected, so I'm marking this ticket as Done.

Screen Shot 2022-08-30 at 12.59.34 PM.png (1×2 px, 196 KB)

Screen Shot 2022-08-30 at 12.59.40 PM.png (988×2 px, 164 KB)