OpenSlides / openslides-backend

Backend service for OpenSlides 4+
MIT License
6 stars 26 forks source link

Fix missing default method for motion poll #2659

Closed Elblinator closed 2 days ago

Elblinator commented 6 days ago

Describe the bug If the default setting for the motion poll default voting methods was not set then no default is preselected in the dialog

How to Reproduce

  1. Have a instance on version 4.1.15 or before
  2. Create a meeting
  3. Upgrade to 4.1.17.staging
  4. Navigate to a motion detail view
  5. Start creating a poll
  6. The voting method will be empty, and you need to select a voting method
  7. (The bug is fixed if you go into the settings and select a voting default method for motion polls)

Expected behavior The voting method yes/no/abstain should be preselected if the setting doesn't show something else

luisa-beerboom commented 3 days ago

It seems correct that there isn't a pre-selection in the client if the setting that is supposed to define the pre-selection is empty. The field motion_poll_default_method is missing a default, however, and there was no migration. Should that be changed?

It is no issue at all to add a default for the field and we can also add a migration that inserts the value YNA into the field on instances that don't have it set. After that, as far as I can understand it, the issue, as described, should be fixed.

Is there something I missed? Otherwise please move this to the backend.