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

fix: fix the actions of votes when different events are triggered #4616

Merged
merged 21 commits into from
Dec 3, 2024

Conversation

mateo-ivc
Copy link
Contributor

@mateo-ivc mateo-ivc commented Nov 8, 2024

Description

The problem was that if a user re-joins the board during a vote, they lose all votes except their own.
The reason for this is that the Fullboard method only queries the votes that the user has created.

Changelog

Backend

boards/boards.go

  • Removed the part that queries for the votes of the user.

api/event-filter

  • Remove unnecessary data from InitEvent -> older votes and votings

Frontend

votes/reducer

  • Add a case that deletes locally saved votes when a new vote is created
  • reverted changes for "deletedVote" event. The filter removed all votes from a note

votings/reducer

  • clear state when creating a new voting

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • The light- and dark-theme are both supported and tested
  • The design was implemented and is responsive for all devices and screen sizes
  • The application was tested in the most commonly used browsers (e.g. Chrome, Firefox, Safari)

(Optional) Visual Changes

This comment has been minimized.

@mateo-ivc mateo-ivc self-assigned this Nov 11, 2024
@mateo-ivc mateo-ivc added the Review Needed This pull request is ready for review label Nov 11, 2024

This comment has been minimized.

Copy link
Member

@Schwehn42 Schwehn42 left a comment

Choose a reason for hiding this comment

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

Do you still have plans to change the backend so only the most recent voting is sent or should we just leave it as is for now?

src/store/features/votes/reducer.ts Outdated Show resolved Hide resolved
src/store/features/votes/reducer.ts Outdated Show resolved Hide resolved
@Schwehn42 Schwehn42 added Changes Requested Changes requested by the reviewer and removed Review Needed This pull request is ready for review labels Nov 12, 2024
@mateo-ivc mateo-ivc added Review Needed This pull request is ready for review and removed Changes Requested Changes requested by the reviewer labels Nov 18, 2024
@mateo-ivc mateo-ivc requested a review from Schwehn42 November 18, 2024 10:37

This comment has been minimized.

@Schwehn42 Schwehn42 added Changes Requested Changes requested by the reviewer and removed Review Needed This pull request is ready for review labels Nov 20, 2024
Copy link
Member

@Schwehn42 Schwehn42 left a comment

Choose a reason for hiding this comment

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

Hi, still multiple issues here unfortunately

  1. Votes by new participants and/or new notes after a voting has concluded don't seem to apply
  2. Reloading after starting a new voting, after one has already concluded gives the result of the first voting, not the new empty one
  3. Whatever the heck this is 💀:
Screenshot 2024-11-22 at 13 40 19

This comment has been minimized.

@mateo-ivc mateo-ivc added Review Needed This pull request is ready for review and removed Changes Requested Changes requested by the reviewer labels Nov 27, 2024

This comment has been minimized.

Copy link
Member

@Schwehn42 Schwehn42 left a comment

Choose a reason for hiding this comment

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

Very nice! I've found one last edge case: During an active voting, deleting a note doesn't delete the votes associated with it.

I would guess that the votes are deleting in the backend, since the deletion cascades, but the frontend doesn't remove the votes just by the event.

@Schwehn42 Schwehn42 added Changes Requested Changes requested by the reviewer and removed Review Needed This pull request is ready for review labels Nov 27, 2024
@mateo-ivc mateo-ivc changed the title remove personal votes fix: fix the actions of votes when different events are triggered Nov 27, 2024

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@mateo-ivc mateo-ivc added Review Needed This pull request is ready for review and removed Changes Requested Changes requested by the reviewer labels Dec 2, 2024
Copy link

github-actions bot commented Dec 2, 2024

The deployment to the dev cluster was successful. You can find the deployment here: https://4616.development.scrumlr.fra.ics.inovex.io
This deployment is only for testing purposes and will be deleted after 1 week.
To redeploy rerun the workflow.
DO NOT STORE IMPORTANT DATA ON THIS DEPLOYMENT

Deployed Images
  • ghcr.io/inovex/scrumlr.io/scrumlr-frontend:sha-67beeda

  • ghcr.io/inovex/scrumlr.io/scrumlr-server:sha-67beeda

Copy link

octomind-dev bot commented Dec 2, 2024

🐙 Octomind

Test Report: 14/14 successful.

description status details
About Section Visibility Test Passed ✅ click
change avatar Passed ✅ click
check Privacy Policy Passed ✅ click
check terms & conditions Passed ✅ click
close cookie banner - front page Passed ✅ click
close cookie banner - sign-in Passed ✅ click
create and delete board columns Passed ✅ click
create_and_delete_notes_and_actions_v2 Passed ✅ click
create lean coffee board Passed ✅ click
edit_notes_and_actions_v5 Passed ✅ click
get started Passed ✅ click
share_session Passed ✅ click
sign-in Passed ✅ click
test all ways to open the setup flow Passed ✅ click

commit sha: 67beeda

Copy link
Member

@Schwehn42 Schwehn42 left a comment

Choose a reason for hiding this comment

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

Everything seems to be working now, amazing and thank you ❤️ :shipit:

@Schwehn42 Schwehn42 removed the Review Needed This pull request is ready for review label Dec 2, 2024
@mateo-ivc mateo-ivc added this pull request to the merge queue Dec 3, 2024
Merged via the queue into main with commit adc6e24 Dec 3, 2024
12 checks passed
@mateo-ivc mateo-ivc deleted the mi/fix-missing-votes branch December 3, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants