discourse/plugins/discourse-topic-voting/lib/discourse_topic_voting
Régis Hanol 73eb2a0b66
FIX: Show voters for closed topics in topic-voting (#40314)
Previously, opening the "who voted" popup on a closed topic returned an
empty list even though the vote count still showed the correct total.
The same was true for any topic whose votes had been archived (e.g.
moved out of a voting category, or trashed).

This was a regression from #39394, which added `votes.active` to
`Topic#who_voted` alongside the same filter applied to "my votes" and
`/topics/voted-by/:username`. That filter is correct for those per-user
listings — you don't want closed-topic votes polluting "your votes" —
but the `who_voted` popup is about historical participation on a
specific topic, not per-user vote accounting.

This change drops `.active` from `Topic#who_voted` so archived votes are
included, restoring the pre-regression behaviour. The accounting filters
in `Votes::Remove`, `User#topics_with_active_vote`, the voted-topics
query, and the `current_user_voted` flag are unchanged.

https://meta.discourse.org/t/403286

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 19:18:25 +02:00
..
badge_queries.rb FEATURE: award badges based on topic votes received (#39493) 2026-04-28 10:53:06 +10:00
categories_controller_extension.rb UX: Add or remove category types with a dropdown (#39477) 2026-04-30 11:38:50 +10:00
category_extension.rb
engine.rb
list_controller_extension.rb
topic_extension.rb FIX: Show voters for closed topics in topic-voting (#40314) 2026-05-26 19:18:25 +02:00
topic_merger.rb FEATURE: award badges based on topic votes received (#39493) 2026-04-28 10:53:06 +10:00
topic_query_extension.rb DEV: Improve vote queries (#39394) 2026-04-21 16:10:28 +10:00
topic_votes_filter.rb FEATURE: support topics filter UI when ordering on votes (#36516) 2025-12-09 12:49:24 +11:00
user_extension.rb DEV: Enable Style/RedundantSelf rubocop rule (#40098) 2026-05-19 19:27:45 +02:00
user_merger.rb FIX: Also merge topic votes when a user is merged (#36416) 2025-12-03 15:31:52 +08:00
web_hook_extension.rb