Page MenuHomePhabricator

Make changes to election creation form for STV [S]
Closed, ResolvedPublic

Description

User story

As an election admin I should be able to create a poll that will use the Single Transferable vote methodology

Acceptance criteria
  • Election admin should be able to select "Single transferable vote with Droop quota" as a choice of "poll type" while creating a new election. See mock 1.
  • Election admin should be able to input candidate names.
    • Looking at the form, this criteria might already be met with the existing (Question, Option) format (see mock 2) where the Options are Candidate names. Please verify that this is indeed the case.
  • Election admin should be able to enter the number of seats to be elected while creating this type of election.
    • Because of the question/option format, this input would be better suited to be positioned alongside the "Question" in the unlikely event someone would like to run multiple polls in the same election. Ideally we would not be allowing multiple questions but it seems that is harder to do, following a conversation with @Tchanders.
  • This work should be behind a feature flag.
Mocks
image.png (462×786 px, 65 KB)
image.png (1×1 px, 110 KB)
1. Poll type.2. Question + Option format

Event Timeline

ARamirez_WMF renamed this task from Make changes to election creation form for STV to Make changes to election creation form for STV [S].May 12 2021, 4:42 PM

Change 690046 had a related patch set uploaded (by STran; author: STran):

[mediawiki/extensions/SecurePoll@master] Enable "STV with Droop quota" option behind feature flag

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

Change 690046 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] Enable "STV with Droop quota" option behind feature flag

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

dom_walden added a subscriber: dom_walden.

I can successfully create an STV election and vote on it. I can go back to the Special:SecurePoll/edit and see that the options I chose were saved successfully. I can also see that the questions and options I set are correct when I go to the voting form. Data appears to be stored correctly on the database.

  • Election admin should be able to select "Single transferable vote with Droop quota" as a choice of "poll type" while creating a new election. See mock 1.

Yes.

  • Election admin should be able to input candidate names.
    • Looking at the form, this criteria might already be met with the existing (Question, Option) format (see mock 2) where the Options are Candidate names. Please verify that this is indeed the case.

Here is how it looks, I assume it will be fine for the admins:

options.png (782×1 px, 38 KB)

  • Election admin should be able to enter the number of seats to be elected while creating this type of election.
    • Because of the question/option format, this input would be better suited to be positioned alongside the "Question" in the unlikely event someone would like to run multiple polls in the same election. Ideally we would not be allowing multiple questions but it seems that is harder to do, following a conversation with @Tchanders.

Yes, see above screenshot. You can set the number of seats per question (although I assume we will only have one question per election).

  • This work should be behind a feature flag.

Yes, I can confirm that this option only appeared when T283711 was done.

Also thanks to @Djackson-ctr for doing some of the testing for this.

Test environment: https://vote.wikimedia.beta.wmflabs.org SecurePoll 3.0.0 (cd59519) 06:09, 1 July 2021.