Page MenuHomePhabricator

Update API layer for event goals
Closed, ResolvedPublic

Description

Acceptance criteria

Details

Event Timeline

Daimona renamed this task from API layer (event registration POST, PUT, and GET endpoints) to Update API layer for event goals.Jan 13 2026, 10:46 PM
Daimona updated the task description. (Show Details)

@MHorsey-WMF, this should be assigned to you, correct?

MHorsey-WMF changed the task status from In Progress to Stalled.Feb 24 2026, 11:43 AM

This is blocked by T414144, once that is complete we can finish this

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

[mediawiki/extensions/CampaignEvents@master] Add goals to API endpoints.

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

Change #1248782 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add goals to API endpoints.

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

โœ… goal_type and goal_target parameters have been introduced and they allow setting goals. (Validation tested as part of T414144)

โœ… goal_type and goal_target parameters have been introduced and they allow setting goals. (Validation tested as part of T414144)

  • The "Get details of an event" endpoint response should include the event goals in the same format as the other two endpoints (i.e., not the goal completion percentage)

โœ… The response includes goal_type and goal_target in the same format as the write endpoints.

  • These changes should be behind a feature flag

โœ…โš ๏ธ For the write endpoints, this is implemented correctly, and the goal_* parameters are rejected as extraneous with the flag turned off. The GET endpoint however always includes them in the response. That's probably OK though, they're just always null.

โŒ Documentation was not updated. I'll do it shortly.

โŒ Documentation was not updated. I'll do it shortly.

โœ… Done now. Nothing to test in the GUI, hence resolving.