discourse/plugins
Robert 47f749744f
FIX: poll when config is on_close only show results when poll is closed (#28299)
See: https://meta.discourse.org/t/cant-edit-topic-with-poll-bug-occurs/320845?u=merefield

When the Poll is set to "results ON_CLOSE", vote numbers for each option are only streamed to the browser when the vote is Closed. It is therefore not possible to render the Results.

The current issue is that when you refresh the page, for those that have voted the default view is results. For this type of poll this should NOT happen. The Results view in this mode should not be possible to see until closure, even for the Author.

Because the votes are not yet serialised when this kind of poll remains open, an attempt to display results causes a JavaScript exception and in any case does not make logical sense.

So the fix here is making sure the default view, for Polls that have results on close, is the voting view until the Poll is Closed.

I've added a test to cover this scenario.

Additionally, this requires a refresh of the page when the poll admin actions a Close to ensure the results are serialized in.
2024-08-13 09:29:16 +02:00
..
automation FEATURE: Change tags sent in topic_tags_changed trigger in automation plugin (#28318) 2024-08-12 14:05:16 -03:00
chat FEATURE: participating users statistics (#28322) 2024-08-12 23:47:13 +02:00
checklist UX: Show error when checkbox change fails (#27968) 2024-07-18 13:22:10 +01:00
discourse-details FIX: allow quote-less details BBCode 2024-06-24 14:16:36 +02:00
discourse-lazy-videos Update translations (#28115) 2024-07-29 15:16:40 +02:00
discourse-local-dates UX: remove whitespace from rendered localdate (#27952) 2024-07-17 09:48:28 -04:00
discourse-narrative-bot UX: Do not delete narrative bot PM when skipping user tips (#28265) 2024-08-08 12:12:01 -04:00
discourse-presence FEATURE: Add Uyghur language (#27183) 2024-05-27 09:58:18 +02:00
footnote Update translations (#28115) 2024-07-29 15:16:40 +02:00
poll FIX: poll when config is on_close only show results when poll is closed (#28299) 2024-08-13 09:29:16 +02:00
spoiler-alert Update translations (#28115) 2024-07-29 15:16:40 +02:00
styleguide UX: Small topic map improvements and fixes (#28215) 2024-08-12 15:37:05 -03:00