Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GN-4430: Don't allow editing agendapoint participants if votings are present #564

Conversation

x-m-el
Copy link
Contributor

@x-m-el x-m-el commented Aug 31, 2023

Overview

Originally, it was always possible to edit the participants in an agendapoint. However, the votings attached are closely related: only present participants can vote. When creating a vote and then changing the participants, this would create a mismatch between both.
In most cases this gave no bugs, except for the voting making less sense.
In the case of removing all participants after adding votes, the votes would be hidden, but still exist. This means that when publishing, the voting would suddenly pop up again. This is the bug mentioned in the ticket.

This fixes this by not allowing participants changes for an agendapoint that has votings.

connected issues and PRs:

https://binnenland.atlassian.net/browse/GN-4430

How to test/reproduce

Getting the bug of a vote showing up when there are no votes in the edit page:
For an agenda:

  1. Add present mandatees
  2. do some votes
  3. change present mandatees to not present
  4. votes will not be shown (votes are only shown if mandatees are present. Votes aren’t removed when changing present mandatees. This is the source of this bug)
  5. Now it looks like there are no votes, but they will still appear on all publishing things.

Besides this being "fixed", you should check that you can never change participants for agendaitems that have a voting.

Challenges/uncertainties

It was hard to figure out how to show this info without even more "warning" popups.
I decided that a disabled button with explanation text was the most clean. It does not scream attention, but will be read if someone is confused, as it is located on the button that disappears.
Note that a disabled button is used purely for the css looks. The disabled button has no code attached to it. Not sure if this is the cleanest way, but it was the most straightforward (and hence easiest+most clear).

@x-m-el x-m-el requested review from dkozickis and abeforgit August 31, 2023 14:35
Copy link
Contributor

@dkozickis dkozickis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use disabled button in publications, for exmaple, so I think this is correct approach 🙏 Tested, LGTM

…s-still-result-in-a-voting-heading-in-publication
@x-m-el x-m-el enabled auto-merge (squash) September 6, 2023 14:46
@x-m-el x-m-el merged commit fe40765 into master Sep 6, 2023
@x-m-el x-m-el deleted the GN-4430-Decisions-without-votings-sometimes-still-result-in-a-voting-heading-in-publication branch September 6, 2023 14:50
@elpoelma elpoelma added the bug Something isn't working label Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants