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

Re-implement debate postponement #1563

Merged
merged 8 commits into from
Sep 26, 2020

Conversation

tienne-B
Copy link
Member

@tienne-B tienne-B commented Jul 23, 2020

In brief, debate postponement is to signal that a ballot should get re-checked or is not vital to the creation of the next round, and so you can advance to the next round with postponed debates.

Debates can be postponed with or without a ballot; to postpone without results, each debate will have a button on the results page in order to postpone the debate. They can only be un-postponed by adding results, and in the assistant view, it is automatic. The button will work if there are results, as the status could be used to indicate that the ballot should be re-checked.

Postponing a debate activates the ballot status consumer, which updates the table, but not the postponement column.

A similar feature was previously available with divisions, but was recently removed.

Fixes #534, with this change as a necessary "guard."
Fixes #1283
Supersedes #1420

Not quite ready; want to make the table buttons update with the consumer, similarly to the icons.

tienne-B added 5 commits July 14, 2020 15:26
If postponements are disabled (which they are by default, and are not
yet implemented), the drop-down for the debate status should not show
the option. Currently, choosing that option causes an error. This commit
checks for the new preference and adapts the options to that.

The new preference re-uses the old text for the preference before
deletion.
This commit re-implements the get_status_meta function to use a dict-
based switch rather than if/elif statements, while adding postponements
back. Further, the ValueError exception raised is replaced by the
generic KeyError.

Fixes BACKEND-3ET
This commit adds the postponed status to the current results statistics
chart, and to the container view. However, the status could not be
added to the time graph as the use of the status is not linear (can be
applied before or after a ballot is submitted).
As we are only checking if 0 (or not 0), the exists() function is
better.
This column is activated with the related preference, showing a button
if the debate is not postponed and text stating its status if it is
postponed. If a debate is postponed, we cannot determine what status
it should have when un-postponed, so keeping it a string.
@philipbelesky
Copy link
Member

Hey, thanks for adding this. I've made a small design tweak to results form. Two things that are probably necessary to finish the PR:

  • Some mention of this option in the docs
  • A slightly more descriptive help text for the preference that focuses on what postponement is/why you would enable it. E.g. "A debate that is postponed will not block the generation of the next round's draw."

@tienne-B
Copy link
Member Author

Done

@philipbelesky philipbelesky merged commit 3119767 into TabbycatDebate:develop Sep 26, 2020
@philipbelesky philipbelesky deleted the feature/postponements branch September 26, 2020 05:00
@czlee
Copy link
Member

czlee commented Oct 5, 2020

Just noting that a regression happened in this PR:
8a84bc6#r42963016

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