Page MenuHomePhabricator

Allow organizer or editor to add an edit
Open, In Progress, Needs TriagePublic3 Estimated Story Points

Description

Note: we will need to check the organizer's permissions. And to do this, we will likely need to ask them to make the change on the wiki where the event was created, like for most other write actions. Note that they would still be able to add edits made on other wikis.

User stories:

As an organizer of an event, I want to be able to add edits done by participants that I think are valid event edits, so that the contribution data for the event can be reliable and accurate.

As an event participant who made an edit, I want to be able to add edits done by me that I think are valid event edits, so that I can be properly recognized for the contributions that I made and have a clear understanding of my impact.

Notes:

* Whoever takes on this ticket will determine the best way to identify an edit to add.

Acceptance Criteria:
  • Given that a user is on the Contributions tab,
    • And they are an organizer of the event,
    • Or they are a registered participant
  • They should see a button in the top corner, with the label: "Add edit to this event"
    • And if they click on the button, they should see the following text:
      • Header: "Add an edit to [event name]"
      • Line 1: "Add an edit"
      • Line 2: Text box to add in edit
      • Line 3: "You can enter a revision ID (oldid)"
        • Note: Instructional text may change, depending on the solution that is implemented.
    • And the dialog should have the following options as buttons:
      • Cancel
      • Add edit (in blue)
    • And if they select Cancel,
      • The dialog disappears and no further action needs to be done
      • And if they select "Add edit,"
        • The edit is added if valid,
        • And they receive a confirmation message: "Edit added, It will appear here soon."
      • And if the edit is not valid, add an error message, which includes:
        • Edit not done by the editor or organizer
          • If editor: "Add an edit that you did only."
          • If organizer: "Add an edit by an event participant only."
        • Edit not on a target wiki of event
          • "Add an edit on a target wiki of the event."
        • Edit not during event period (i.e., between start & end date of event)
          • "This event is not currently active, so you cannot associate this edit with it."
        • Edit id/text is not valid in general (such as gibberish or not identified in the db)
          • "This edit is not recognized. Please try again."
    • And if they try to add the same edit twice (e.g., before the first job was processed)
      • The edit should still only be added once, and the second submission should be ignored (ignoreDuplicates on the job could suffice)

Design proposal:

  1. Participant/organizer clicks on 'Add edit to this event

Group 5400.png (811×1 px, 112 KB)

  1. Once that button is clicked, a dialog comes up prompting the user to insert an edit identifier: revision ID, or full diff link ( e.g. https://en.wikipedia.org/w/index.php?title=User_talk:PralineCoffee&oldid=1308319125)

Group 5399.png (811×1 px, 106 KB)

  1. After the user adds their edit, they receive a confirmation message.

{F66081226}

Out of scope:
  • Bulk add
  • Separate column/view to show added associations
  • Support for who has final "vote" in an "association war"
  • Logging: This will be handled separately in T406633. In the future, we will want to have some way to show added associations (i.e., who & when added), such as a new column or new tab with the data. This way, organizers or participants can stay up-to-date on changes that they may want to monitor. But we do not need to show this data in the UI for this ticket.

Event Timeline

ifried renamed this task from [placeholder] Allow organizer or editor to add an edit to Allow organizer or editor to add an edit.Sep 5 2025, 5:16 PM

@JFernandez-WMF, can you update the screenshot for "After the user adds their edit, they receive a confirmation message."?

Daimona updated the task description. (Show Details)
ifried updated the task description. (Show Details)

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

[mediawiki/extensions/CampaignEvents@master] Implement Dialog to add contributions to event

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

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

[mediawiki/core@master] Add header to codex table pager

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

Change #1195227 merged by jenkins-bot:

[mediawiki/core@master] Add header to codex table pager

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

Test wiki created on Patch demo by MHorsey-WMF using patch(es) linked to this task:
https://82f35f84e6.catalyst.wmcloud.org/w/

This changed how the display of the Special:SuggestedInvestigations page. Specifically before we had no caption and now we have a caption that was not in our designs.

Can this please be reverted or made specific to your special page? I would like to avoid these changes being deployed to our Special:SuggestedInvestigations special page during this week's train.

cc @MHorsey-WMF @Catrope

Specifically we have the following difference, which for us is not intended. We currently have issues with the table pager being too big on mobile devices, so having this caption at quite a large size is making this problem worse.

Currently deployed version on English WikipediaWhat it looks like on my dev wiki
image.png (387×1 px, 49 KB)
image.png (479×1 px, 59 KB)

^ I just updated the AC for the "edit not during event period" case, since a different message was recently agreed upon in T408960.


This changed how the display of the Special:SuggestedInvestigations page. Specifically before we had no caption and now we have a caption that was not in our designs.

Can this please be reverted or made specific to your special page? I would like to avoid these changes being deployed to our Special:SuggestedInvestigations special page during this week's train.

Apologies, this was an unintended change and I didn't realize it would happen. Still happy you quickly figured it out and fixed it well before I noticed the messages above.

One thing I just thought about: in the current implementation, when someone adds a contribution it is not added to the table in real time. Firstly, this would be tricky because some of the information we need to build the table row cannot quickly be built client-side (like figuring out the localised name of the wiki, or proper linking, etc.). But most importantly, even if that weren't an issue, new contributions are enqueued for delayed processing and not added immediately. It could be a matter of seconds, but under high load it could take minutes (and in extreme cases hours, or fail altogether). So, I don't think it can be "fixed", but maybe we can update the success message to clarify this point? E.g. "Edit added, it will appear here soon" (I know this sucks, it's just to give an idea of the general concept).

Perhaps make this edit later on?

Perhaps make this edit later on?

Makes sense to me, but one thing to keep in mind is that once the success message is translated, the old translation will remain until someone updates it.

Also, I forgot to do it in my previous comment, but pinging @ifried and @JFernandez-WMF for awareness.

Notes from Dec 1 meeting:

  • AC updated to have new success message
  • @MHorsey-WMF will create a separate task for error when trying to add an edit for a non-target wiki

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