SpaceKrakens / Ranked-Vote

a Ranked-Voting system for developers using GitHub
7 stars 2 forks source link

Time limited polls #17

Open powli opened 7 years ago

powli commented 7 years ago

Add a date option to limit a poll to a set date. After the specified day is finished, no further votes are allowed and the poll should only be visible in result mode.

Things to do:

longtomjr commented 7 years ago

see #22 Date time picker was added, and the model has been modified to contain the end date.

What still needs to be done:

longtomjr commented 7 years ago

Note, you are currently bale to create time limits in the past, this should not be allowed.

powli commented 7 years ago

Quick thought: We should also determine if we want to save a timestamp or just the date (and end the poll on the next day GMT-wise).

longtomjr commented 7 years ago

Currently we are saving the time and date in UTC, I think having time suport is helpfull

longtomjr commented 7 years ago

Disallowed the possibility to select a date in the past with a minimum of 2 hours length. This is not checked on post yet.

TODO:

What needs to be determined:

Pings for thoughts: @powli @Tranberry @NogginBops @Dormanil @vogonistic

Feel free to edit the message as the state of this issue change.

NogginBops commented 7 years ago

I like the ability to set time limits, but that could be problematic with regards to different time zones. Shouldn't be too hard to implement though I imagine.

longtomjr commented 7 years ago

Implementation is not a problem. It is more about the direction we want to go with this. I like the ability to set the time, but there is a case to be made to have the time set only to the nearest hour, to simplify picking a date and time.

NogginBops commented 7 years ago

I like the nearest hour idea, maybe like increments of half an hour could work?

powli commented 7 years ago

I'm also just for the nearest hour for now. If it seems necessary we can implement more detailed times later anyway.

For timezones, I would just add a select field with all time zones to the poll creation and normalize them to GMT upon saving to the DB. So the server can just compare GMT timestamps internally.

We might need to change the timestamps in the frontend according to the timezone of the user, but I would consider that future jazz.

BraedonWooding commented 7 years ago

Should the creator of the poll be able to change the date during the time it's open? Or could that be abused to do undemocratic actions?

longtomjr commented 7 years ago

@powli as far as I am aware moment() (what is used by the bootstrap widget) automatically works in the user's timezone and will convert it to GMT on post.

I dont think we should have the ability to change the time the poll closes once it is set. It allows for system abuse, and for the poll to remain democratic, the rules need to be stated from the start (afaik).