Open MorganLove opened 5 years ago
ah I think this is just because the numbers don't work out with the total number of ballots cast. It doesn't have to match exactly, but it should also be realistic. @mcchilders maybe you can provide some sample 3-choice numbers for the wyandotte manifest that would be reasonable?
@MorganLove maybe we should define an error condition here. If the data is simply invalid to run an audit, what would you like me to return?
Maybe you could return a string to check for, such as "invalid data"? And I could check for this and handle the error message on the UI?
On Mon, Jul 29, 2019 at 7:05 PM Ben Adida notifications@github.com wrote:
@MorganLove https://github.com/MorganLove maybe we should define an error condition here. If the data is simply invalid to run an audit, what would you like me to return?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/votingworks/arlo/issues/53?email_source=notifications&email_token=AB5YSK3WCWUMIBWP3JHBD53QB6OXLA5CNFSM4IGTSVHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3CQT6A#issuecomment-516229624, or mute the thread https://github.com/notifications/unsubscribe-auth/AB5YSKYNXY6F2HVRREB6ZLDQB6OXLANCNFSM4IGTSVHA .
@benadida Thinking from a user's perspective, we want to let them know as soon as possible that the numbers entered won't work for calculating an audit. So ideally what would happen is that the backend checks the numbers submitted to /audit/basic
and if they are realistic, save them and return a populated audit.contests
array in the next /audit/status
, but if they are unrealistic, return a useful message in the POST response from the submission to /audit/basic
and don't save the data (and the next /audit/status
call would return an empty audit.contests
array). That way the frontend can await
the response from /audit/basic
and display the message like a validation error, letting the user know that the numbers provided won't work for an audit. Then they can update the numbers and try again. Are there different reasons why the numbers might not work for running the audit, and thus different possible return messages? If not, you can return whatever and we can just show a generic message like "The audit cannot be calculated with the numbers provided."
Is this still relevant?
Environments: Tested on current master (and on the branch for PR support multiple contests and candidates)
Passing Scenarios
1 Contest 2 Choices a. Type 1 vote for a b. Type 2 votes for B c. Type 100 votes for total ballots d. Submit Audit settings and upload ballot manifest Result: Able to submit form
1 Contest 3 Choices a. Type 1 vote for a b. Type 2 votes for B c. Type 3 votes for c d. Type 100 votes for total ballots e. Submit Audit settings and upload ballot manifest Result: Able to submit form
2 Contests 2 Choices a. Type 1 vote for a for both contests b. Type 2 votes for B for both contests d. Type 100 votes for total ballots e. Submit Audit settings and upload ballot manifest Result: Able to submit form
2 Contest 3 Choices a. Type 1 vote for a for both b. Type 2 votes for B for both c. Type 3 votes for c for both d. Type 100 votes for total ballots e. Submit Audit settings and upload ballot manifest Result: Able to submit form
Failing Scenarios
1 Contest 2 Choices a. Type 19 vote for a b. Type 20 votes for B c. Type 40 votes for total ballots d. Submit Audit settings and upload ballot manifest Result: Error
1 Contest 3 Choices a. Type 19 vote for a b. Type 20 votes for B c. Type 10 votes for c d. Type 40 votes for total ballots e. Submit Audit settings and upload ballot manifest Result: Error
2 Contests 2 Choices a. Type 19 vote for a for both contests b. Type 20 votes for B for both contests d. Type 40 votes for total ballots e. Submit Audit settings and upload ballot manifest Result: Error
2 Contest 3 Choices a. Type 19 vote for a for both b. Type 20 votes for B for both c. Type 10 votes for c for both d. Type 40 votes for total ballots e. Submit Audit settings and upload ballot manifest Result: Error
Ballot Manifest: Ballot Manifest May 2019 Election - WYANDOTTE.csv