yanghengtang / pe

0 stars 0 forks source link

Parameter cost can be made to become 0 #4

Open yanghengtang opened 11 months ago

yanghengtang commented 11 months ago

As stated in the UG:

Screenshot 2023-11-17 at 5.02.32 PM.png

And attempting to do editTransaction 1 c=0

Screenshot 2023-11-17 at 5.03.41 PM.png

However, attempting to do editTransaction 1 c=0.01/5 which makes cost essentially zero is allowed.

Screenshot 2023-11-17 at 5.02.02 PM.png

nus-pe-script commented 11 months ago

Team's Response

We allow all non zero values even if they are extremely small, and it is displayed as 0.00 due to rounding off which is intended behaviour mentioned in our UG. However, we did not mention that costs are rounded off to 2 decimal places. In our UG, where we state that portions and balances are rounded off to 2 decimal places. In fact, all numerical values in our application are rounded off to 2 decimal places when they are displayed. Hence it is actually a documentation bug where did not mention that costs are also rounded off to 2 decimal places.

In this case, the cost is still a positive rational number, that is just displayed as 0.00 due to rounding off.

image.png

We have labelled this as low severity because:

  1. It is rare that total cost is such a low number. It is unlikely to affect many users, or to significantly impact users.
  2. Rounding off money-related numbers to 2 decimal places is not uncommon. The behaviour of rounding balances is also covered in the FAQ. Rounding costs in a similar manner is not likely to cause confusion to users.

    Items for the Tester to Verify

    :question: Issue type

Team chose [type.DocumentationBug] Originally [type.FunctionalityBug]

Reason for disagreement: [replace this with your explanation]


## :question: Issue severity Team chose [`severity.Low`] Originally [`severity.Medium`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]