Page MenuHomePhabricator

Drag and drop voting does not respect "Limit input to number of seats" option in UI
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

If an STV election limits the number of candidates you can vote for to the number of seats, the drag and drop UI will still let you rank more than that number of candidates. When you submit your vote, any excess ranked candidates are ignored.

It might be better from a UX perspective to prevent the user from ranking more candidates than they are allowed. The old interface did this.

Steps to reproduce problem
  1. Create an STV election: In the Questions section check the "Limit input to number of seats" and make sure the number of seats is fewer than the number of options.
  2. Vote on the election: rank more candidates than there are seats.
  3. Submit vote: see excess ranked candidates ignored.
Environment

Wiki(s): https://vote.wikimedia.beta.wmflabs.org SecurePoll 3.0.0 (13b4755) 08:06, 16 May 2025.

Screenshots

Election setup:

more_candidates_than_seats_setup.png (712×874 px, 36 KB)

Voting for more than the limit of candidates:

more_candidates_than_seats.png (308×771 px, 15 KB)

Vote summary, showing excess votes ignored:

more_candidates_than_seats_summary.png (315×439 px, 12 KB)

Event Timeline

Amdrel changed the task status from Open to In Progress.May 28 2025, 6:24 PM
Amdrel claimed this task.
Amdrel moved this task from Backlog to Actively working on the MediaWiki-extensions-SecurePoll board.

Change #1152104 had a related patch set uploaded (by Amdrel; author: Amdrel):

[mediawiki/extensions/SecurePoll@master] Make drag and drop voting respect seat limit

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

Change #1152104 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] Make drag and drop voting respect seat limit

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

Novem_Linguae subscribed.

Tested. Fixed in the new STV interface.