Poll: Ranked Choice: Should not be able to vote when all options are abstained

AI-generated summary

A bug was discovered by nat where users can cast a vote even when all options are set to abstain. merefield demonstrated the issue in a video recording. The problem is that the algorithm ignores abstained options, making such votes pointless and wasteful of database space. A fix has been proposed in a pull request.

STR:

  • Initially all options are set to abstain
  • Correctly, the Vote button is disabled
  • Select one option and give it a rank
  • Correctly, the Vote button is now enabled!
  • Change it back to Abstain
  • The Vote button is still active and it’s possible to vote to completely Abstain!

This is pointless as the algorithm ignores all abstained options so this should be prevented so as not to record pointless votes and waste database rows.

@nat discovered this, I’m just recording it!

3 Likes

But have no fear, @merefield is here! :man_superhero: :

https://github.com/discourse/discourse/pull/29601

6 Likes

This topic was automatically closed after 3 days. New replies are no longer allowed.