Page MenuHomePhabricator

Investigate - Can SecurePoll produce voter lists for multiple polls [8H]
Closed, ResolvedPublic

Description

SecurePoll can produce a list of all participating voters once the election has been closed. This task is to verify that this can be done for a scenario when multiple polls are running in parallel.

Event Timeline

Niharika triaged this task as Medium priority.Jan 13 2021, 5:18 AM
Niharika created this task.
ARamirez_WMF renamed this task from Verify that SecurePoll can produce voter lists for multiple polls to Investigate - Can SecurePoll produce voter lists for multiple polls [8H].Jan 13 2021, 5:39 PM

@jrbs could you clarify if there's a specific script that needs to be checked? I'm testing this locally and have created 2 polls w/different voter lists and can confirm on the /lists page that they function as expected (the voters are not mixed). I also ran ./cli/dump.php --votes and can confirm that 2 different vote dumps are created. This ticket mentions a voter list and I wasn't sure how to get that from the scripts in ./cli.

However, I did also look into the database and it looks like whenever a user votes in a poll, they're assigned a unique actor id per election. For instance:

sqlite> select vote_voter, vote_voter_name from securepoll_votes where vote_election = 107;
vote_voter  vote_voter_name
----------  ---------------
18          Admin          
21          Admin2         
22          User1          
25          User2          
26          User3
sqlite> select vote_voter, vote_voter_name from securepoll_votes where vote_election = 114;
vote_voter  vote_voter_name
----------  ---------------
19          Admin          
20          Admin2         
23          User1          
24          User2          
28          User4

So if there isn't a specific script, I can at least confirm that unique voter rolls are available.

chatted briefly w/Joe and per our convo:

I think the ideal outcome would be the ability to run and tally 2+ elections at the same time.

Locally, I have seen no issues in running multiple elections at once. Nothing in the code suggests that any election would be affected by another election either. I think further QA should be codified elsewhere.

Tallying only occurs after an election has finished. There is a coded block in the GUI that prevents you from tallying in-progress elections. Therefore, at the time any sort of tallying happens, all elections are in the same "done" state. Given that there's no vote conflation reported between elections, I would say that you can tally as many as elections as you want to.

I tested ./cli/tally.php as well since that was brought up as a possible interpretation of this ask:

root@5e6c816b0150:/var/www/html/w/extensions/SecurePoll# php ./cli/tally.php --name "Multi Test 1"
1
A          | 3
B          | 2

2
C          | 2
D          | 1

This also does not produce a list of voters.

Can someone confirm that SecurePoll has a feature that outputs a voter participation roll? It isn't in any of the documentation that I've read or any of the scripts I've tested but the feature list says that it's possible. Is it participating voters or eligible voters? Is this actually a feature request? cc @Niharika @drochford in case you had any insight I've missed? 🙇

Confirmed in standup today that this was being done via SQL query, which I can confirm can still be done. The query will be something like:
SELECT vote_voter_name FROM securepoll_votes WHERE vote_election = <election_id>;

Deciding whether or not to make this part of the GUI is another task.