Page MenuHomePhabricator

STVBallot: Add optional limitation of number of seats
Closed, ResolvedPublic

Description

In creation of a STVBallot a checkbox for limitation of the number of seats can be activated. With activating the number of the seats will be considered to the number of shown dropdown widgets. If checkbox is not activated the number of dropdowns will not be restricted and all are shown.

Implemented by order of Wikimedia Foundation / Team "Movement Strategy and Governance"

Related change: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SecurePoll/+/771317

Event Timeline

Osnard changed the task status from Open to In Progress.Mar 30 2022, 9:40 AM
Osnard assigned this task to Miriamin.
Osnard triaged this task as Medium priority.

@Huji You are listed as reviewer for the SecurePoll extension. Could you please have a look at the proposed changes?

Maybe you could also help with testing the new feature. There is an existing integration test for the STVBallot, but @Miriamin and me didn't find a way to properly test the changes in there. Creating a dedicated UnitTest was also not feasible, due to the nature of the STVBallo implementation. Could you please advise?

@Osnard, @Miriamin I just have a conversation with @xSavitar who can support on reviewing. (Many thanks in advance). But we need some automated tests attached to the patch. Can you please prepare these?
Thanks

We'd love to provide tests for the patch, but as stated in the above comment, we didn't find a proper way to provide one. The existing integration test can apparently not be used to thest this. And creating a dedicated UnitTest was also not possible, due to the architecture of the component we were changing (great number of explicit and implicit dependencies that could not be mocked properly).

Maybe we could get some hint?

Hi @Osnard ,

Thanks for the reply. We had a review session today with @xSavitar. Some comments are left in the PR on gerrit.

Thanks

Thanks for the review. We will check it now.

Change 771317 had a related patch set uploaded (by D3r1ck01; author: Mschlindwein):

[mediawiki/extensions/SecurePoll@master] STVBallot: Add limit option for seats

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

Change 771317 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] STVBallot: Add limit option for seats

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

Hi folks, some of the Foundation folks supporting the upcoming board election had some concerns around this patch - could we confirm that this is limiting the number of options that are rankable to a defined number? At the moment we have concerns that the "defined number" may be set to the number of seats, which is not a desirable outcome.

For example, if this were enabled for the upcoming Board elections, it would limit voters to just two options, rather than allowing them to rank all six. Meek STV is actually designed to allow for people to rank as many options as they want, so this decision would potentially have a pretty major impact on how voters behave.

Hi @jrbs,

This is a checkbox that can be checked if the limitation is needed, or unchecked if not. So it can work either way.

You can test it here: https://securepoll.wmf.labs.hallowelt.biz/w/index.php/Special:SecurePoll

Will share login details with you in private.

Thanks

Hi @jrbs,

This is a checkbox that can be checked if the limitation is needed, or unchecked if not. So it can work either way.

You can test it here: https://securepoll.wmf.labs.hallowelt.biz/w/index.php/Special:SecurePoll

Will share login details with you in private.

Thanks

Thanks Mahuton, appreciated!

I still however think this solution is not optimal. The number should not be limited to just the number of seats in the election, but rather be a configurable value (that could be determined by consensus or by committee quota, for example). Limiting it to just the number of seats is not a desirable outcome IMO.

The statement of work submitted for this requires that the limit is configurable:

  • Election administrator enters the maximum number of Options (candidates) to be selected. This limit is indicated to the end user in the GUI.

This change has little value if the limit is fixed to the number of winners.

Hi,

A new patch will be submitted to make it configurable, and a new task will be created for that. This task can be resolved since the first patch is now deployed.

Many thanks