OpenSlides / openslides-backend

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

Entitled to vote list: false entries if vote delegation was activated #2482

Open MSoeb opened 3 weeks ago

MSoeb commented 3 weeks ago

Description: There is a protocol error in the list of entitled users who had previously delegated their vote. The vote delegation permission is still incorrectly displayed in the list, even if it has been deactivated in the meeting. The previously set vote delegation is saved and displayed in the list even though the user has voted for themselves.

example of wrong information: image

Reproduction:

  1. open a meeting
  2. open settings > participants > vote delegation: enable vote delegation
  3. open participants: add the admin to the meeting. create a new user, add it to group delegates and delegate the voting right to the admin
  4. open setting > participants > vote delegation: deactivate it
  5. open elections: create an election and let the groups admin and delegates vote.
  6. let the admin and the other user now vote.
  7. open the entitled to vote list -> under the new created user should falsy be a hint that he/she is represented by the admin.

What should happen: The entitled to vote list should correctly track, if a vote delegation was active during a vote or a poll. If the vote delegation permission is deactivated and a vote/poll is performed, the list should NEVER include a hint for vote delegations. Even if a vote delegation was set active before the vote. By deactivating the feature, it should be disabled even for the voting protocols.

luisa-beerboom commented 1 week ago

I had a bit of a look at this feature and found out the following:

The entitled_users_at_stop field is currently filled purely with data from the backend, which simply counts up all users that are currently, at the time of the poll stop, in any of the entitled groups. The vote_delegated_to_user_id field is always filled with the user id of whomever the user in question is currently delegating to. From what I can see, this happens without consideration for:

My assessment of the entire situation would be as follows:

What is the requirement here @MSoeb ?

luisa-beerboom commented 2 days ago

Talked with @MSoeb this is actually just about leaving the field empty if delegations are turned off