Skip to content

Make the random order of poll options optional

Alex requested to merge voting-updates into master

Part of #975

What does this MR do?

Two unrelated updates for the voting:

  • when creating a poll the author can choose if the options should be shown in a random order
  • additional check for consistent data: the backend makes sure that all options in a poll have different texts

How confident are you it won't break things if deployed?

Very sure. This can't break any ongoing polls because the options will shuffle by default.

How to test

first part:

  1. Checkout branch locally
  2. run ./scripts/docker-compose exec app vendor/bin/phinx migrate
  3. Login as uservoting1
  4. Go to the region's voting page and create a new poll
  5. Fill out the form, uncheck the "Optionen beim Abstimmen in zufälliger Reihenfolge anzeigen" checkbox, and submit
  6. Reload the poll's page a few times -> the options should always be in the same order

second part:

  1. Checkout branch locally
  2. Login as uservoting1
  3. Go to the region's voting page and create a new poll
  4. Fill out the form and use the same text for two options -> submitting should not be possible

Screenshots (if applicable)

screenshot

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • set a "for:" label to indicate who will be affected by this change
  • use "state:" labels to track this MR's state until it was beta tested
  • added an entry to CHANGELOG.md
  • add a short text that can be used in the release notes
  • Once your MR has been merged, you are responsible to create a testing issue in Beta Testing Repo:
    • Consider writing a detailed description in German.
    • Describe in a few sentences, what should be tested from a user perspective.
    • Also mention different settings (e.g. different browsers, roles, ...). how this change can be tested.
    • Be aware, that also non technical people should understand.

Release notes text

(A short text that will appear in the release notes and describes the change for non-technical people. Not always necessary, e.g. not for refactoring.)

Edited by Alex

Merge request reports