adding support for implicit invalid votes in ballots.json
#84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Up until now, implicit and explicit invalid votes were treated equally. The reason behind this was simple: all invalid votes end up in the electoral results counted as invalid and discarded for anything else, so there was no need to do anything else.
However, since we integrate with third-parties and provide the ballots for them to perform the tally themselves, a new need has arisen. They want to access to the content of the ballot, and decide for themselves if it is invalid or not and manage this process.
This PR implements this new feature, with the following changes and considerations:
ballots.json
file now will now contain the decoded ballot selections, even if they are invalid.ballots.json
file, theballot. ballot_flags.null_vote
boolean flag indicates if a ballot was an explicit invalid ballot, and theballot. ballot_flags.implicit_null_vote
indicates if our tally system deemed that ballot invalid when the ballot was not explicitly set as such, because some restrictions on the ballot was violated.null_vote
mark will appear.ballots.csv
file containing the ballots in CSV format, NULL_VOTE will always appear for any explicit and implicit ballot, but then the voter's selection will also appear as usual in the following columns.An example of an implicit invalid cast vote extracted from
ballots.json
can be seen here: