Zer0Legion / pe

0 stars 0 forks source link

Split functionality has wrong total amount #12

Open Zer0Legion opened 7 months ago

Zer0Legion commented 7 months ago

Expected: split functionality correctly handles splitting of money Actual: extra money magically pops up when splitting money Steps to reproduce:

  1. Ensure 6 contacts. In my case they have the indexes of 13, 14, 15, 16, 17, 18
  2. split 13 14 15 16 17 18 $/99.44
  3. Observe each of these contacts now owe me 14.21.
  4. As the UG says it evenly splits the amount, multiply this by 7 to get $99.47 instead of the original amount of $99.44
  5. Extra 3 cents Screenshots:

image.png

nus-pe-script commented 7 months ago

Team's Response

Thank you for pointing this out. This issue is because of rounding, e.g. 14.205 gets rounded to 14.21. In real life, when we split $99.44 amongst 7 people, there inevitably will be an issue with fractional cents. While some people might prefer 3 people to pay $14.21 and 3 people to pay $14.20, FriendFolio's approach is to just round off and make everyone pay $14.21 because in real life most people might just ask their 6 friends to pay them the same amount of money instead of having 3 random people pay extra 1 cent. In addition, if 3 people were to pay extra 1 cent, then the distribution will no longer be equal, as stated in our user guide.

Items for the Tester to Verify

:question: Issue response

Team chose [response.NotInScope]

Reason for disagreement: The team did not explain why this should be not in scope.

image.png

There is no mention of the split functionality possibly having a wrong total amount in the UG:

image.png

nor has the team argued that the software would fail gracefully.


## :question: Issue type Team chose [`type.FeatureFlaw`] Originally [`type.FunctionalityBug`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]
## :question: Issue severity Team chose [`severity.Low`] Originally [`severity.Medium`] - [x] I disagree **Reason for disagreement:** If the team intends their product to be for long-term use, one would know that cents do add up. For example, going by their way of splitting, the person who logs these expenses for an extended period of time (let's say a student stays in hall and is the only person who logs their hall suppers over the period of 1 year), this person stands to gain a significant imbalance of the split in their favour. This violates the inherent intended feature fit of the product, which is to work well for an extended period of time beyond one-time transactions.