Page MenuHomePhabricator

Prevent users from enabling collaborative contributions if no wikis selected
Open, In Progress, Needs TriagePublic2 Estimated Story Points

Description

Acceptance Criteria:

  • Given that a user is on Special:EnableEventRegistration or Special:EditEventRegistration,
    • They should not be able to enable Collaborative Contributions if they have "no wikis" selected as the target wiki
  • And if the organizer tries to enable contribution tracking for an event that has no target wikis,
    • They should see the following error message: "Contribution statistics can only be enabled for events with at least one target wiki."

Event Timeline

Change #1193466 had a related patch set uploaded (by Mhorsey; author: Mhorsey):

[mediawiki/extensions/CampaignEvents@master] Prevent users from enabling collaborative contributions if no wikis selected

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

Change #1193466 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Prevent users from enabling collaborative contributions if no wikis selected

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

Test wiki created on Patch demo by CMelo (WMF) using patch(es) linked to this task:
https://3418ffa02b.catalyst.wmcloud.org/w/

Acceptance Criteria:

  • Given that a user is on Special:EnableEventRegistration or Special:EditEventRegistration,
    • ✅ They should not be able to enable Collaborative Contributions if they have "no wikis" selected as the target wiki
Special:EnableEventRegistrationSpecial:EditEventRegistration
Screenshot 2025-10-24 at 12.10.17 PM.png (992×1 px, 145 KB)
Screenshot 2025-10-24 at 12.14.01 PM.png (996×1 px, 145 KB)
  • And if the organizer tries to enable contribution tracking for an event that has no target wikis,
    • ✅ They should see the following error message: "Contribution statistics can only be enabled for events with at least one target wiki."
      Screenshot 2025-10-24 at 12.12.43 PM.png (478×1 px, 63 KB)

AC met.


One question though, when I enable event registration, and "No specific wikis" is selected, then the "Show contribution statistics" is successfully disabled. But the checkbox remains checked so it appears as though contribution statistics is enabled and disabling it is not allowed, but actually contribution statistics is correctly disabled but the box remains checked. So the UI makes it appear that contribution statistics are enabled. Hmmm thoughts @ifried @JFernandez-WMF @MHorsey-WMF ?

This correctly disables contribution statistics, but checkbox is remains checked
Screenshot 2025-10-24 at 12.10.17 PM.png (992×1 px, 145 KB)

Edit - I went ahead and made a ticket for this. But sending to design sign off for thoughts. T408240