Page MenuHomePhabricator

Allow organizer to set or edit goal
Closed, ResolvedPublic

Description

User stories:

Setting goals:

As an event organizer, I want to be able to set a goal for my event, so that participants are motivated to join and contribute based on the goal, and so that I can have a clear story of the event outcome based on the goal.

As an event participant, I want to know how my contributions help accomplish the goals of the event, so that I can understand the impact of my edits and of the event overall.

Editing goals:

As an event organizer, I want to be able to edit goals for my event, so that that I can respond to trends that I am seeing during the event (such as a goal being too ambitious or not ambitious enough) and therefore set the most inspiring yet realistic targets for my event.

Acceptance Criteria:

  • Collaborative contributions, goal setting, and P&E Dashboard should be in a new section between "Event details" and "Questions for participants"
    • Section header: Impact statistics
    • Section description:
Collect statistics on the impact of your events. You can do this by [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:CampaignEvents/Registration/Collaborative_contributions#Organizers:_How_to_set_up_collaborative_contributions turning on contribution statistics] and/or adding the [https://meta.wikimedia.org/wiki/Special:MyLanguage/Programs_%26_Events_Dashboard Programs & Events Dashboard] link.
If you turn on Contribution statistics, you can set a shared goal to inspire your participants. Progress against the goal will be publicly viewable.
  • Section order:
  • Collaborative contributions (preserve helper text below field)
  • Goal-setting
  • P&E Dashboard link (preserve helper text below field)
  • Given that an event has Collaborative Contributions enabled,
    • An organizer should be able to optionally set or edit an event goal in Special:EnableEventRegistration and Special:EditEventRegistration
    • And event goal is off by default
      • Note: We will start with only 1 goal for MVP, but we may allow multiple goals later (with one data point per goal)
    • The field for event goal should be directly below the toggle to turn on/off collaborative contributions.
    • Event goal should be in the following format:
      • 1 task type as a dropdown
        • Label: "Goal metric"
        • Placeholder: "Choose an option"
        • Options should be from the data that is already tracked by collaborative contributions (i.e., number of articles created, number of articles edited, total edits, bytes added/removed, links added/removed)
        • If nothing added, the placeholder text should be: "Choose an option" and the target field must be disabled
      • Quantitative value (integer) as second selection
        • Label: "Target number"
        • Should validate that it is an integer
        • Minimum number of 1, no maximum number
        • If nothing added, the placeholder text should be: "Add a number"
  • If Goal Metric is select and Target is empty and the user tries to submit the form
  • Then a message is shown in the field without submiting the form sayng: "Please fill out this field."
  • If Goal Metric is select and Target is less then 1 and the user tries to submit the form
  • Then a message is shown in the field without submiting the form sayng: "Value must be greater than or equal to 1."
  • If only 1 of the 2 fields is selected, then error message should be: "You need to fill in both required fields to set a goal." [This is still valid but only in the API]
  • Note that the event goal is editable by the organizer at any time
  • These are the messages for each of the Goal Metric options in the dropdown
    • Number of articles created
    • Number of articles edited
    • Total edits
    • Bytes added
    • Bytes removed
    • Links added
    • Links removed
  • These changes should be behind a feature flag

Visual example:

Organizer sets goal in Enable event registration form
Captura de pantalla 2026-02-26 a la(s) 1.16.38 p. m..png (1,946×1,342 px, 252 KB)

Event Timeline

ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)
ifried renamed this task from [placeholder] Allow organizer to set goal to Allow organizer to set goal.Dec 3 2025, 9:00 PM
ifried renamed this task from Allow organizer to set goal to Allow organizer to set or edit goal.Jan 22 2026, 7:32 PM
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)
cmelo changed the task status from Open to In Progress.Feb 3 2026, 3:49 PM
cmelo claimed this task.

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

[mediawiki/extensions/CampaignEvents@master] Allow organizer to set or edit goal

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

A few things missing in the AC / questions:

  • Where would this new field be in the form?
  • Are the messages used in the design screenshot up-to-date, and if so can they be added to the AC?
  • What would the exact labels be for the first dropdown?
  • Should the target number field be hidden when no metric is selected?

@JFernandez-WMF @ifried

Decisions reached after discussion between @JFernandez-WMF & me:

A few things missing in the AC / questions:

  • Where would this new field be in the form?
  • The new field should only be displayed if an event has collaborative contributions enabled, and the new field should be directly below the toggle to turn on/off collaborative contributions.
  • Are the messages used in the design screenshot up-to-date, and if so can they be added to the AC?

Yes, with some tweaks, and we'll update the AC: "Set a shared goal to inspire your participants. Progress against the goal will be publicly viewable."

  • What would the exact labels be for the first dropdown?
  • Label: "Goal metric"
  • Placeholder: "Choose an option"
  • Label: "Target number"
  • Placeholder: "Type a number"
  • Should the target number field be hidden when no metric is selected?

No.

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

  • The new field should only be displayed if an event has collaborative contributions enabled, and the new field should be directly below the toggle to turn on/off collaborative contributions.

So, I haven't been accurate with the terminology, but according to the design specs (F70860558), this would be a form section with two fields, not just a field. I'm mentioning this because putting a form section in the middle of a form might look a bit different than in the AC (you'd have an indented and framed group with the two fields, same as the one for participant questions, but nested into the main section). I'll let @cmelo comment on this as he should know better about the details, but I want to make sure that this is known. (That's also why the temporary implementation put it at the end).

  • What would the exact labels be for the first dropdown?

Apologies that this was unclear, but I mean the labels for the options inside the dropdown. There's a list in the AC, so I was mostly wondering if we could use that list after a couple minor tweaks (capital letters and obviously splitting out the types that are currently separated by a slash into two separate types).

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

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

So, I haven't been accurate with the terminology, but according to the design specs (F70860558), this would be a form section with two fields, not just a field. I'm mentioning this because putting a form section in the middle of a form might look a bit different than in the AC (you'd have an indented and framed group with the two fields, same as the one for participant questions, but nested into the main section). I'll let @cmelo comment on this as he should know better about the details, but I want to make sure that this is known. (That's also why the temporary implementation put it at the end).

I am fine with the decision to be directly below the toggle to turn on/off collaborative contributions.
Also, I asked @ifried about it, and the decision was to leave it as it is, meaning below the toggle to turn on/off collaborative contributions.

What would the exact labels be for the first dropdown?

I have talked about this with @ifried and I have just updated the AC with the decision below:

  • These are the messages for each of the Goal Metric options in the dropdown
    • Number of articles created
    • Number of articles edited
    • Total edits
    • Bytes added
    • Bytes removed
    • Links added
    • Links removed

Feb 25 meeting notes:
We discussed the following options for collaborative contributions & goal-setting
1 - new section between event details and participant q - we chose this option
2 - no section, section header, or subtitle
3 - new section with frame within a frame
4 - new section but apply custom styling to avoid frame-within-frame

Change #1243962 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Reorder tracking tools and collaborative contributions properties

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

Hi @JFernandez-WMF, thanks for the new design. I am wondering if I should ignore the part below the Programs & Events Dashboard link, which says:
Explanation text - could include a link.

Or should I wait for it to be defined?

@cmelo im sorry, that was me just trying stuff out and forgot to remove it from the mock! i'll update it :)

Change #1243962 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Reorder tracking tools and collaborative contributions properties

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

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

[mediawiki/extensions/CampaignEvents@master] Reorder form fields to match visual rendering order

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

Daimona updated the task description. (Show Details)

Updated AC looks great. Thank you!

Change #1251319 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Create section for impact statistics in the registration form

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

Change #1236326 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Allow organizer to set or edit goal

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

Form/UI tests

  • ✅ Impact statistics section is placed between Event details and Questions for participants on Special:EnableEventRegistration and Special:EditEventRegistration.
  • ✅ Inside Impact statistics, order is: Contribution statistics toggle -> Goal metric/Target number fields -> P&E Dashboard URL field.
  • ✅ Feature flag CampaignEventsEnableEventGoals OFF: Goal metric/Target number fields are not rendered.
  • ✅ Feature flag CampaignEventsEnableEventGoals ON: Goal metric/Target number fields are rendered.
  • ✅ If no Goal metric is selected, Target number field is disabled (not hidden).
  • ✅ If a Goal metric is selected, Target number field becomes enabled.
  • ✅ Submitting with a selected metric + valid integer target (>= 1) saves the goal successfully.
  • ✅ Submitting with a selected metric + empty target does not submit and shows: Please fill out this field.
  • ✅ Submitting with target < 1 does not submit and shows: Value must be greater than or equal to 1.
  • ✅ Target number does not accept non-numeric values.
  • ✅ If Contribution statistics is disabled, submitting shows a form-level error: You must turn on Contribution statistics in order to add an event goal.
  • ✅ Organizer can edit an existing goal via Special:EditEventRegistration and the updated value is persisted.

This has been tested as part of the general release, so I'm marking it done.