Page MenuHomePhabricator

Special:DeleteEventRegistration: Check if the event page belongs to the wiki where the organizer is trying to delete event
Open, Needs TriagePublic2 Estimated Story Points

Description

As an event organizer who is trying to delete my event registration, I want to be redirected to the wiki of the my event, so that I can successfully delete my event registration.

Acceptance Criteria:

  • Given an event organizer goes to the Special:DeleteEventRegistration/{eventID}
    • And the event ID does not belong to the wiki where the user is trying to access the page
      • Then we display the following text: "Please delete your event registration on [wiki name], the wiki where the event was created."
        • Hyperlink to the proper wiki Special:DeleteEventRegistration/{eventID} on the following text: "delete your event registration on [wiki name]"
          • Note that the wiki name should be displayed as a URL (such as en.wikipedia.org) rather than the DB name
  • Given a user tries to delete an event using the "Delete a registration" API endpoint
    • And the event does not belong to the current wiki
    • Then they should receive a 4xx response with an error message similar to the one above
    • And this new error should be documented on mediawiki.org

Design
Design Specs

image.png (706×2 px, 106 KB)

Event Timeline

Hello, @gonyeahialam! Can you add in a visual example in the "Visual example" section of this task? Thank you in advance!

Hello, @gonyeahialam! Can you add in a visual example in the "Visual example" section of this task? Thank you in advance!

Done

ifried updated the task description. (Show Details)
ifried set the point value for this task to 3.
ifried renamed this task from Delete: Check if the event page belongs to the wiki where the organizer is trying to delete event to Special:DeleteEventRegistration: Check if the event page belongs to the wiki where the organizer is trying to delete event.Mar 5 2024, 4:22 PM
ifried updated the task description. (Show Details)
ifried changed the point value for this task from 3 to 2.Mar 5 2024, 5:17 PM
Daimona updated the task description. (Show Details)
Daimona updated the task description. (Show Details)

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

[mediawiki/extensions/CampaignEvents@master] Add notice in case a user tries to delete a registration on another wiki

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

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

[mediawiki/extensions/CampaignEvents@master] Add error message in case user the tries to use the delete event registration API on another wiki

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

Daimona changed the task status from In Progress to Stalled.Mar 21 2024, 1:23 PM
Daimona subscribed.

Blocked on T312568.

Moved to in review after team discussion on how we will unblock this work, which is: Remove open/close in all cases (whether on the local or foreign wiki) from the kebab menu, and redirect users to special delete page if on a foreign wiki

Daimona changed the task status from Stalled to Open.Apr 4 2024, 2:31 PM

Change #1012640 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add notice in case a user tries to delete a registration on another wiki

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

Change #1012672 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] DeleteEventRegistrationHandler: fail if the event is not local

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

Given an event organizer goes to the Special:DeleteEventRegistration/{eventID}
And the event ID does not belong to the wiki where the user is trying to access the page
✅ Then we display the following text: "Please delete your event registration on [wiki name], the wiki where the event was created."
✅ Hyperlink to the proper wiki Special:DeleteEventRegistration/{eventID} on the following text: "delete your event registration on [wiki name]"
Note that the wiki name should be displayed as a URL (such as en.wikipedia.org) rather than the DB name

(Note that the link will be correctly made bold to match the comp when this patch is merged.)

Screenshot 2024-04-10 at 3.23.21 PM.png (416×2 px, 61 KB)

Given a user tries to delete an event using the "Delete a registration" API endpoint
And the event does not belong to the current wiki
✅ Then they should receive a 4xx response with an error message similar to the one above

T358781.png (342×1 px, 69 KB)

❌ And this new error should be documented on mediawiki.org
@cmelo Please delete your event registration on XXX, the wiki where the event was created. needs to be added to the Delete a registration documentation on mediawiki.org

Given an event organizer goes to the Special:DeleteEventRegistration/{eventID}
And the event ID does not belong to the wiki where the user is trying to access the page
✅ Then we display the following text: "Please delete your event registration on [wiki name], the wiki where the event was created."
✅ Hyperlink to the proper wiki Special:DeleteEventRegistration/{eventID} on the following text: "delete your event registration on [wiki name]"
Note that the wiki name should be displayed as a URL (such as en.wikipedia.org) rather than the DB name

(Note that the link will be correctly made bold to match the comp when this patch is merged.)

Screenshot 2024-04-10 at 3.23.21 PM.png (416×2 px, 61 KB)

Given a user tries to delete an event using the "Delete a registration" API endpoint
And the event does not belong to the current wiki
✅ Then they should receive a 4xx response with an error message similar to the one above

T358781.png (342×1 px, 69 KB)

❌ And this new error should be documented on mediawiki.org
@cmelo Please delete your event registration on XXX, the wiki where the event was created. needs to be added to the Delete a registration documentation on mediawiki.org

✅ Error message is now documented on mediawiki.org

Final thing before sending to design sign off is This patch that makes the link bold to match the comp.

@vaughnwalters

❌ And this new error should be documented on mediawiki.org
@cmelo Please delete your event registration on XXX, the wiki where the event was created. needs to be added to the Delete a registration documentation on mediawiki.org

Done, thank you!

In T358781#9709769, @cmelo wrote:

@vaughnwalters

❌ And this new error should be documented on mediawiki.org
@cmelo Please delete your event registration on XXX, the wiki where the event was created. needs to be added to the Delete a registration documentation on mediawiki.org

Done, thank you!

Docs updated and link is bold, so all AC is now met and I am sending this to design sign off.

Screenshot 2024-04-15 at 3.04.37 PM.png (674×1 px, 131 KB)