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

Partial ballot submission #45

Open
jdharms opened this issue Oct 25, 2014 · 3 comments
Open

Partial ballot submission #45

jdharms opened this issue Oct 25, 2014 · 3 comments
Labels

Comments

@jdharms
Copy link
Collaborator

jdharms commented Oct 25, 2014

This change will carry some subtleties, as we currently expect all committed ballots to be valid. Let's discuss approach here.

@brandonsato
Copy link
Owner

I'm thinking add a Save Draft button alongside the submit button. This should indicate to the user that the ballot is being stored but will not count unless he comes back and submits it. When the user presses that button, tell the user that it has been saved but not submitted, possibly with an alert() before actually sending the POST to avoid misunderstandings.

Other than that, its probably fine to allow completely invalid ballots to be saved with every team being the same. Since duplicate teams should be marked via #39, the user should understand that those errors would need to be addressed before final submission.

@jdharms
Copy link
Collaborator Author

jdharms commented Oct 27, 2014

I was more referencing the fact that our scoring functions assume all ballots are valid.

Two options I see:

  1. Column on ballot indicating it's "valid" that's marked on submission but not save. Don't change submission semantics (still can only submit when there are no duplicates, all teams filled). Saved ballots update all teams and reasons, but don't mark the valid flag.

Even still there are some interesting situations you can get into when you submit a valid ballot, then save an invalid one. I imagine in that case the valid flag gets cleared, but I could see it being a usability issue.

  1. Save/Submit buttons are essentially different only to the user, and both save all their votes into the ballot. When our scoring methods loop over ballots, they filter by an is_valid function we'll write.

I'm partial to 1, but I guarantee we get someone Save a valid ballot, never commit it, and then complain when I refuse to go back and mark it as valid.

@brandonsato
Copy link
Owner

Hmm, good points. I actually kind of prefer the second, or at least a combination of the two, ie, call the is_valid function when a ballot is saved, and mark the flag appropriately. ( edit : Actually we can just use the form validation to mark the flag). On submit, the current behavior is maintained and always mark it valid.

The issue of saving a ballot after submitting a ballot is still there though. Should a submitted ballot be kept until the draft ballot is actually submitted? We can add another flag to designate submitted vs draft, but then we have 2 ballots for a user. And I can imagine a user submitting a ballot, editing it and saving the draft, then deciding he wants to use his submitted ballot as the basis for a new draft. So, allow users to delete draft ballots, and use valid drafts if no submitted ballot exists? Just spitballing here.

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

No branches or pull requests

2 participants