Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement bulk uploading ballots from the UI #724

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

ArendPeter
Copy link
Member

@ArendPeter ArendPeter commented Jan 13, 2025

Description

I've already pushed changes adding a placeholder "upload elections" UI and also the backend upload ballots API. This PR connects the two and implements the following

  • Parse CSV
  • Create New Election & Race
  • Upload Ballots in batches

This will create closed elections, since people aren't intended to vote in these through the UI, and then upload the ballots

There's more work that needs to be done, checkout #723 for next steps

Screenshots / Videos (frontend only)

(no sound, only video)

2025-01-12.17-11-11.mp4

@ArendPeter ArendPeter mentioned this pull request Jan 13, 2025
8 tasks
@mikefranze
Copy link
Collaborator

Trying to follow along but with previous pushed changes its hard to tell what's new. Is there any way to tell what ballots have been uploaded by the admin and what were uploaded by the voters? Is there any way to know that ballots were uploaded?

@ArendPeter
Copy link
Member Author

Trying to follow along but with previous pushed changes its hard to tell what's new.

My bad, yeah this is building on some things I already pushed. Here are some other relevant commits prior to the PR

  • Initial Placeholder UI: 3f81c9c
  • Refactoring shared function in castVoteController: 3a8b627
  • Implementing initial UploadBallots API: a8b0665

Is there any way to tell what ballots have been uploaded by the admin and what were uploaded by the voters? Is there any way to know that ballots were uploaded?

Not yet, what do you think the best approach would be? Perhaps we when updating the history we can set the action_type to "submitted_by_admin" instead of "submit"? OR we could add a new field to the Ballot for "submitted_by_voter"? I guess it depends on how we plan to use the information

@mikefranze
Copy link
Collaborator

Not yet, what do you think the best approach would be? Perhaps we when updating the history we can set the action_type to "submitted_by_admin" instead of "submit"? OR we could add a new field to the Ballot for "submitted_by_voter"? I guess it depends on how we plan to use the information

Yea not sure how exactly how the information would be used. If we find that we need a specific query for it than we would add a field. But either way adding it to the history is a good idea. The history has a field for who did the action right? Could add the admin info there and just put voter if it was the voter.

If that change is made I'd be ok approving.

@ArendPeter
Copy link
Member Author

Not yet, what do you think the best approach would be? Perhaps we when updating the history we can set the action_type to "submitted_by_admin" instead of "submit"? OR we could add a new field to the Ballot for "submitted_by_voter"? I guess it depends on how we plan to use the information

Yea not sure how exactly how the information would be used. If we find that we need a specific query for it than we would add a field. But either way adding it to the history is a good idea. The history has a field for who did the action right? Could add the admin info there and just put voter if it was the voter.

If that change is made I'd be ok approving.

Done! I updated the PR

It's probably easiest to review my most recent 4 commits individually rather than the full diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants