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
- Log in as a registered user on beta wik.
- Create a new wish using the wish creation workflow.
- ✅❓❌⬜ 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
- After creating the wish, verify that its status is Under review.
- Navigate to the wish page and observe the vote count.
- Inspect the /Votes subpage
- ✅❓❌⬜ 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
- Change the wish status to a vote-able status (e.g., “Accepted”).
- Reload the wish page.
- Observe the displayed vote count.
- ✅❓❌⬜ 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
- Remove all votes from the wish, including the auto-generated proposer vote
- Reload the wish page.
- Observe the vote count.
- ✅❓❌⬜ AC4: Confirm that the vote count updates to zero.
Test Case 5: Ensure Mobile works the same
- Repeat test case 1-4 but with Minerva skin
- ✅❓❌⬜ AC5: Confirm that everything with the mobile works similarly to the Desktop
QA Results - Meta Beta
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T406670#11448517 |
| 2 | ✅ | T406670#11448517 |
| 3 | ✅ | T406670#11448517 |
| 4 | ✅ | T406670#11448517 |
| 5 | ✅ | T406670#11448517 |
