Page MenuHomePhabricator

Automatically add a support vote on behalf of a wish proposer
Closed, ResolvedPublicFeature

Description

Background

In the annual Community Wishlist Surveys of years past, we automatically included proposers in the count of support votes. We should do the same with our new extension. The idea being that it's safe to assume a user supports the wish they created.

Wishes can't be voted on in the UI when they are first created because they are in the "Under review" status. There's nothing however stopping anyone from editing the /Votes subpage. Given this, we can add the vote (using the action=wishlistvote API) at the same time that the wish is created, then when the wish is changed to a vote-able status, the vote will simply appear. We do however need to ensure the vote isn't counted until the wish has a vote-able status, which appears to be a preexisting bug.

See also the related bug: T406669: Vote count isn't changed to zero when all votes are removed

Acceptance criteria
  • Make sure votes aren't counted unless the entity has a vote-able status
  • When a wish is created, make a request to action=wishlistvote on behalf of the user. Leave the comment blank – they'll be able to change it later if they want to.
  • After deployment, run a script to add the auto-votes for all the wishes created prior to this feature being released.

Derived Requirement

Automatically submit a support vote on behalf of the user who creates a wish using the action=wishlistvote API, with an empty comment. The auto-generated vote must be stored but must not be counted until the wish reaches a vote-able status. After deployment, a script must add missing proposer votes to all previously created wishes. The system must also ensure vote counts display correctly when all votes—including auto-generated ones—are removed.

Test Steps

Test Case 1: Automatically add a proposer support vote when creating a new wish

  1. Log in as a registered user on beta wik.
  2. Create a new wish using the wish creation workflow.
  3. ✅❓❌⬜ AC1: Confirm proposer support vote when creating a new wish with a blank comment for the wish creator.

Test Case 2: Ensure auto-generated vote is not counted for wishes in Under Review status

  1. After creating the wish, verify that its status is Under review.
  2. Navigate to the wish page and observe the vote count.
  3. Inspect the /Votes subpage
  4. ✅❓❌⬜ AC2: Confirm that the auto-generated vote exists but is not included in the displayed vote count.

Test Case 3: Ensure auto-generated vote becomes counted once the wish becomes vote-able

  1. Change the wish status to a vote-able status (e.g., “Accepted”).
  2. Reload the wish page.
  3. Observe the displayed vote count.
  4. ✅❓❌⬜ AC3: Confirm that the proposer’s auto-vote is now included in the vote count once the wish is vote-able.

Test Case 4: Ensure vote count updates correctly when all votes are removed

  1. Remove all votes from the wish, including the auto-generated proposer vote
  2. Reload the wish page.
  3. Observe the vote count.
  4. ✅❓❌⬜ AC4: Confirm that the vote count updates to zero.

Test Case 5: Ensure Mobile works the same

  1. Repeat test case 1-4 but with Minerva skin
  2. ✅❓❌⬜ AC5: Confirm that everything with the mobile works similarly to the Desktop

QA Results - Meta Beta

Event Timeline

MusikAnimal changed the subtype of this task from "Task" to "Feature Request".Oct 8 2025, 12:03 AM

Change #1197598 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/CommunityRequests@master] Add proposer's vote to new wishes

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

When a wish is created, make a request to action=wishlistvote on behalf of the user. Leave the comment blank – they'll be able to change it later if they want to.

To be clear, the comment can only be changed by editing the /Votes page or after the status is changed to one that allows voting.

Also, the default wording for under-review is not fitting anymore This wish is currently under review. Once accepted, you will be able to support it.. Looping @JSengupta-WMF @Meztuinaga-ctr

From the acceptance criteria, I understood that automatic vote of the wish author won't be displayed (assumption here: not counted = not displayed) till the wish is in vote-able status. So the default wording can still work.

I would add another acceptance criteria that the author of a wish won't be able to remove their support.

I would add another acceptance criteria that the author of a wish won't be able to remove their support.

That defeats the whole point, which is to make the author be able to retract their initial support so the count accurately reflects the actual number of people who support the wish. Otherwise you wouldn't need to actually add the author's support, only to start the count with 1 instead of 0.

The patch I have in progress is basically just going to add the proposer to the /Votes subpage, and after that it'll just be a normal vote to be removed or updated at will.

If we do want it to enforced, you're right @Nardog it would more easily be done by adding 1 to the vote count.

I guess there could be odd things such as a proposer being globally blocked, or vanished, or there being some other reason that their support vote needs to be removed (not that we would I think for any of those...).

I wrote this on [[Talk:Community Wishlist]] but it's germane here too: I for one don't understand why we can't vote for wishes under review. It adds the burden of having to remember or make notes of wishes you intend to vote for. Why not just hide the votes until the wish is accepted... It might even facilitate the review process since the numbers of support votes would indicate which wishes have merit.

When a wish is created, make a request to action=wishlistvote on behalf of the user. Leave the comment blank – they'll be able to change it later if they want to.

To be clear, the comment can only be changed by editing the /Votes page or after the status is changed to one that allows voting.

Also, the default wording for under-review is not fitting anymore This wish is currently under review. Once accepted, you will be able to support it.. Looping @JSengupta-WMF @Meztuinaga-ctr

Can we follow up with another ticket to track this change? Generally would be good to do a messaging audit and ensure all strings are still relevant (else, decide on updates).

MusikAnimal changed the task status from Open to In Progress.Oct 29 2025, 5:19 AM

Change #1202904 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/CommunityRequests@master] Inject the logger service into all API classes

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

Change #1202906 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/CommunityRequests@master] Move vote-saving into parent class

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

Change #1202904 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Inject the logger service into all API classes

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

Change #1202906 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Move vote-saving into parent class

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

Change #1197598 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Add proposer's vote to new wishes

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

MusikAnimal changed the task status from In Progress to Open.Dec 5 2025, 6:05 AM

@Samwilson Confirmed that it automatically adds a support vote on behalf of a wish proposer, as seen in the videos below. I will mark this as Resolved. Thanks for all your work!

Test Result - Meta Beta

Status: ✅ PASS
Environment: Meta Beta
OS: macOS Tahoe 26.1
Browser: Chrome 142
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Automatically add a proposer support vote when creating a new wish

  1. Log in as a registered user on beta wik.
  2. Create a new wish using the wish creation workflow.
  3. ✅ AC1: Confirm proposer support vote when creating a new wish with a blank comment for the wish creator, only when it's a vote-able status.

Test Case 2: Ensure auto-generated vote is not counted for wishes in Under Review status

  1. After creating the wish, verify that its status is Under review.
  2. Navigate to the wish page and observe the vote count.
  3. Inspect the /Votes subpage
  4. ✅ AC2: Confirm that the auto-generated vote exists but is not included in the displayed vote count.

2025-12-10_09-59-40.png (1×1 px, 172 KB)

Test Case 3: Ensure auto-generated vote becomes counted once the wish becomes vote-able

  1. Change the wish status to a vote-able status (e.g., “Accepted”).
  2. Reload the wish page.
  3. Observe the displayed vote count.
  4. ✅ AC3: Confirm that the proposer’s auto-vote is now included in the vote count once the wish is vote-able.

See AC1

Test Case 4: Ensure vote count updates correctly when all votes are removed

  1. Remove all votes from the wish, including the auto-generated proposer vote
  2. Reload the wish page.
  3. Observe the vote count.
  4. ✅ AC4: Confirm that the vote count updates to zero.

Test Case 5: Ensure Mobile works the same

  1. Repeat test case 1-4 but with Minerva skin
  2. ✅ AC5: Confirm that everything with the mobile works similarly to the Desktop

GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF updated the task description. (Show Details)

Wait, so you're not retroactively filling in support votes on behalf of the authors of existing wishes (even though wishes created after the patch for this task went live already automatically have one vote minimum)? That seems... not good.