Ranked choice polls don't do runoffs correctly

AI-generated summary

A user, seanblue, reported an issue with a ranked choice poll, stating that a winner was declared in the first round despite not having a majority of the votes. merefield offered to investigate and requested access to the votes export, but seanblue didn’t have the necessary permissions. merefield asked seanblue to request the data from an admin, but it was not provided.

Despite the lack of data, merefield was able to identify the issue and created a pull request (PR) to fix the bug. The PR was reviewed and merefield confirmed that it would be merged soon. seanblue expressed appreciation for merefield’s efforts in resolving the issue.

This ranked choice poll has 15 voters. The result says Fantasy won in the first round.

However, it only has a 7 of the 15 votes for rank 1, which is not a majority. Since ranked voting requires a majority, there should be at least one runoff in this case.

2 Likes

@merefield do you want to look at this?

1 Like

I will take a look at your issue in time.

Can you please PM me the votes export using the export button (might be under the cog)

1 Like

Sorry, I’m not an admin so I don’t think I have that option. Let me know if there’s anything I can do as a regular user.

If you could ask an admin for it I’d be most grateful.

1 Like

Raised a PR (currently in draft) for this.

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

It was a fairly simple bug in the majority check (most of the PR is a new test based on this exact example)

@seanblue let’s discuss in our PM you are happy to move forward with this change.

Once we’ve discussed together, I’ll mark this Ready for Review.

2 Likes

I responded in PM, but everything looks good to me. The admin of this site has been busy lately and never responded to my request for the data, so I appreciate your time investigating it even without the data.

2 Likes

Great to see people using this functionality and nice when people report issues in such detail, making it much easier to track down :+1:

PR has been approved, I guess it will be merged imminently.

4 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.