Page MenuHomePhabricator

Validate that an edit belongs to a target wiki
Closed, ResolvedPublic

Description

Given that an edit is not on a target wiki of event
When submitting that edit via the API
Then return an error: "Add an edit on a target wiki of the event."

Event Timeline

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

[mediawiki/extensions/CampaignEvents@master] Check revision is on one of the targeted wikis for the specified event

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

Aklapper renamed this task from Validate that an edit belongs to a target wiki. to Validate that an edit belongs to a target wiki.Dec 2 2025, 4:50 PM

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

Change #1214033 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Check revision is on one of the targeted wikis for the specified event

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

vaughnwalters subscribed.

Given that an edit is not on a target wiki of event
When submitting that edit via the API
✅ Then return an error: "Add an edit on a target wiki of the event."

{
    "errorKey": "campaignevents-event-contribution-not-target-wiki",
    "messageTranslations": {
        "en": "Add an edit on a target wiki of the event."
    },
    "httpCode": 400,
    "httpReason": "Bad Request"
}

Screenshot 2025-12-17 at 4.50.03 PM.png (1,710×940 px, 176 KB)

working as expected, nice work, sending to product sign off

Test wiki on Patch demo by MHorsey-WMF using patch(es) linked to this task was deleted:

https://ad14911813.catalyst.wmcloud.org/w/