PetrichorPrecipice / pe

0 stars 0 forks source link

When amount gets too large, error mesage for overtime is wrong #6

Open PetrichorPrecipice opened 10 months ago

PetrichorPrecipice commented 10 months ago

Entering the following command:

overtime id/EID2023-5678 o/inc a/10000000000 Shows this error: Screenshot 2023-11-17 at 4.58.06 PM.png Which is arguably incorrect since 10000000000 is indeed a positive integer. However, this case should almost never occur.

nus-se-script commented 10 months ago

Team's Response

This is the same as the reported bug about overtime integer overflow.

The 'Original' Bug

[The team marked this bug as a duplicate of the following bug]

Wrong error message when adding an amount with very big numbers

Screenshot 2023-11-17 at 16.45.00.png

Amount is a positive integer but still gives error saying that amount must be a positive integer.

The only restriction when amount is a positive integer. While as a tech people we know that integer is limited to 2**32, as non tech people there is no upper boundary to what integer is. Hence, the user can still put in a very large number to the salary. This occurrence is not uncommon considering that there are still currencies that uses many 0s in their money nominal, for example IDR (Indonesian Rupiah).

I think the correct error message should be "Number of overtime hours should not be above 72 or below 0"

Screenshot 2023-11-17 at 16.46.48.png


[original: nus-cs2103-AY2324S1/pe-interim#1068] [original labels: type.FunctionalityBug severity.Medium]

Their Response to the 'Original' Bug

[This is the team's response to the above 'original' bug]

image.png

The case of integer overflow is unlikely when entering overtime hours. The justification that "currencies that uses many 0s in their money nominal, for example IDR (Indonesian Rupiah)" is also not applicable because this command only has overtime hours as a parameter, not salary.

The bug was reproduced and did not "crash the app, corrupt the data, or make it unusable". As such, per the CS2103T website, this bug is rejected.

Items for the Tester to Verify

:question: Issue duplicate status

Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)

Reason for disagreement: [replace this with your explanation]


## :question: Issue response Team chose [`response.Rejected`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]
## :question: Issue type Team chose [`type.FeatureFlaw`] Originally [`type.FunctionalityBug`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]