Ranked Choice poll doesn't use min/max settings properly

AI-generated summary

The discussion revolves around a perceived issue with Discourse’s Ranked Choice poll feature, where min/max vote constraints (e.g., min=2, max=3) do not function as expected. v-maxbraden reports that users can rank more options than the max allows, and min values above 1 cause the poll to revert to a bullet list. sam suggests the issue may stem from how ranked choice is implemented and tags merefield for insight. merefield clarifies that this behavior is not a bug, as Instant Run-off Voting (the standard behind Ranked Choice) traditionally allows voters full discretion in how many candidates to rank. He notes the markdown interface’s permissiveness might mislead users into thinking min/max settings apply, though the UI form itself doesn’t expose those options for Ranked Choice. He reclassifies the topic as a #feature request, offering to implement the functionality as a freelancer if commissioned, and encourages users to reach out via Marketplace or PM for a quote. He also mentions he’d be open to submitting a PR if the feature is accepted by the Discourse team. merefield includes screenshots showing the poll creation UI and the markdown shell, reinforcing that the settings are absent from the form but visible in markdown, which may cause confusion.

When I create a multiple choice polls I can can set the minimum and maximum number of choices before Vote is enabled, but this doesn’t seem to work for Ranked Choice voting.

If I create a poll with five options:
poll type=ranked_choice results=always min=1 max=3 public=false chartType=bar

The max=3 parameter seems to be ineffective; a user can still rank four or all options.
The min=1 parameter only works if it’s a 1. If I set it to 2 or more, the poll undoes itself and is just a bullet list.

Maybe this is by design or is an issue particular to the way ranked choice works?
We have a use case where we want users to rank a minimum number of the poll options, and ranked choice is preferable to multiple choice.

2 Likes

It feels to me related to ranked_choice implementation, maybe @merefield has some ideas here?

I am sure we can sort something out here.

1 Like

Yeah, this isn’t currently supported, but I would definitely not call that a bug.

Perhaps the markdown interface is too permissive and that’s misleading and you might well argue that’s a minor bug. But it shouldn’t be a surprise to people who know instant run-off that this isn’t part of the algorithm.

It’s not really a standard feature of Ranked Choice, Instant Run-off Voting, where the voter has the discretion to select the number of candidates they wish to rank, and can abstain on the others.

Imagine restricting someone on a ballot paper. I guess someone could call your paper spoiled if you rank 4 out of 5 candidates and somewhere on the instructions you were told you could have only 3, but suspect that’s not usual as it would cause confusion and a lot of spoiled ballots which might upset the electorate.

But of course Discourse doesn’t run on paper :slight_smile:

And sure you could definitely add that feature! - it could make sense to limit things to 2 or 3 choices out of 5.

See:

1 Like

To follow up I had a re-look at the build dialogue to refresh my memory.

As you can see there is no misleading setting for Ranked Choice on the form. So the bug is not here. I respect it remains visible on the markdown shell for Polls and that could lead you to believe it might have an effect.

I think this is fairer as a Contribute > Feature request. Moving it there.

I’d be happy to work on it if hired to do so (I’m not a member of the Discourse team and as a freelancer not paid a salary, time is money … ), consider posting in Marketplace or PMing me direct for a quote if this is important to you. I’d be very happy to PR if acceptable.

4 Likes