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

Transactions updates do not recalculate shares for participants #20

Open
benji1000 opened this issue May 25, 2020 · 0 comments
Open

Transactions updates do not recalculate shares for participants #20

benji1000 opened this issue May 25, 2020 · 0 comments

Comments

@benji1000
Copy link

benji1000 commented May 25, 2020

Hello,

SplittyPie is a very simple, clean and useful app, but I noticed a nasty bug. When you update a transaction, whether to add or remove a participant, or update the amount, the total is not recalculated until you reload the page.

How to reproduce the bug:

  1. Create a new event and add three participants, let's name them Alice, Bob and John.
  2. Bob adds a transaction of 33€ shared among himself, Alice and John.
  3. "Overview" tab: both Alice and John owe 11€ to Bob. It's normal.
  4. Update the transaction to remove Alice.
  5. "Overview" tab: Alice still owes 11€ to Bob (instead of 0€).
  6. Update the transaction to change the amount, for example to 30€.
  7. "Overview" tab: Alice and John still owe 11€ to Bob (instead of 0€ for Alice and 15€ for John).
  8. Add a participant to the event, let's call her Eve.
  9. "Overview" tab: now only John owes 15€ to Bob. It's normal.
  10. Include Eve to the transaction.
  11. "Overview" tab: John still owes 15€ to Bob, and Eve owes him nothing (instead of 10€ for both).
  12. Reload the page in your browser: the shares are correctly calculated.

I believe this bug is critical, since it can give a false sense of thinking the transactions are shared evenly among participants, however they are not.

One thing to note is that deleting a transaction works correctly. So a mitigation is to delete and re-add a transaction instead of just updating it. Another mitigation is to reload the page in the browser to display the correct amount. But it is very annoying!

Thank you for anyone that will be able to work on the code to solve this issue!

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

No branches or pull requests

1 participant