Page MenuHomePhabricator

SecurePoll should not select option by default in histogram range votes
Open, MediumPublicFeature

Description

Feature summary (what you would like to be able to do and where):
Elections using histogram range voting (i.e. with radio buttons, typically with "support/oppose/neutral" should optionally launch the ballot with nothing selected.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
Right now, setting up a ballot on SecurePoll requires one to specify a "default" value. For elections with a "neutral" option this is fine, but it means it is impossible to set up an election with only two options (as providing either as the default would be imposing some form of bias).

Benefits (why should this be implemented?):

  • would allow votes with no "neutral" option

Details

Due Date
Mar 30 2024, 7:00 AM

Event Timeline

jrbs triaged this task as Lowest priority.Jan 6 2023, 2:08 PM
jrbs raised the priority of this task from Lowest to Medium.Feb 13 2023, 5:53 PM
jrbs moved this task from Backlog to Needs evaluation on the MediaWiki-extensions-SecurePoll board.

Request from MCDC, so raising its priority.

jrbs set Due Date to Mar 30 2024, 7:00 AM.Feb 13 2023, 5:54 PM

If I understand this correctly: this is about having the option to create a histogram range ballot with no default value selected when someone wants to vote.

I had a look into it and for me the current situation looks like this:
While creating the ballot, there is the option to set a default value but it is not required.
You can create it without setting a default value. If a default value is given, the value is set but if there is no default value given nothing is preselected if a user wants to vote.

I understand that the goal of this ticket has already been achieved, but if I have misunderstood something, I would be grateful if I could get some more information so that I can solve the problem.

I created a poll with no default value and this is how the ballot looks like if I want to vote:

image.png (208×312 px, 9 KB)

[...]
I understand that the goal of this ticket has already been achieved, but if I have misunderstood something, I would be grateful if I could get some more information so that I can solve the problem.

I created a poll with no default value and this is how the ballot looks like if I want to vote:

image.png (208×312 px, 9 KB)

Interesting. I just did similar on my local install of SecurePoll and got this:

Screenshot 2024-03-19 at 11.48.43.png (234×297 px, 12 KB)

I wonder if you are using "+1" and "-1" as maximum and minimum scores, or "+1" and "0"? It looks like SecurePoll adds the 0 to fill the gap. I assume it would probably add other integers if the min and max were e.g. -5 and +5. I think using +1 and 0 is fine, since in histogram range votes we manually adjudicate the percentages anyway, and don't use the score provided by the tally output directly.

I do wonder how those "blank" votes work out in the tally. The system does not seem to warn me when I submit a totally blank vote and I wonder if that vote even counts at all?

I do wonder how those "blank" votes work out in the tally. The system does not seem to warn me when I submit a totally blank vote and I wonder if that vote even counts at all?

Ah, it seems it does, since I get the "You have voted in this election before." note as expected. Unfortunately I can't run the tally because of a (probably unrelated) error on my own wiki ([6cc28f00199fe52b2379f75e] /index.php/Special:SecurePoll/tally/120 TypeError: Return value of MediaWiki\Extension\SecurePoll\Ballots\Ballot::getUserLang() must be an instance of Language, null returned)

Yes - I used minimum value "0" and maximum value "1" because if you create the range "-1" to "1" it will add "0". Also if you select "-5" and "5" it will add all integers in between, including "0".
I tested what happens if you don't vote anything: For the ballot with "0" and "1" it was tallied with "0". I also checked this with a ballot including numbers "1" and "2" - then its not possible to submit a blank vote, so blank is always counted with "0" in this case.

Ah, it seems it does, since I get the "You have voted in this election before." note as expected. Unfortunately I can't run the tally because of a (probably unrelated) error on my own wiki ([6cc28f00199fe52b2379f75e] /index.php/Special:SecurePoll/tally/120 TypeError: Return value of MediaWiki\Extension\SecurePoll\Ballots\Ballot::getUserLang() must be an instance of Language, null returned)

I had this error as well - but did a local quickfix by returning any language to test the tallying - but I don't if the issue is related or not.

Ah! I tested this myself and it does already seem possible even if the options are "0" and "1", as long as the option to require votes is selected. So I think indeed this task is already resolved.

The actual error box is quite ugly, but that would I think require another task to resolve.

Screenshot 2024-03-21 at 12.00.47 PM.png (280×1 px, 26 KB)