Jacky142857 / pe

0 stars 0 forks source link

Wrong error message for charge command. #1

Open Jacky142857 opened 2 years ago

Jacky142857 commented 2 years ago

image.png

Steps to reproduce: charge 7 m/13-2022 c/100

Expected result: Notify me that the month I have entered is invalid/out of bounds.

Actual result: A formatting error is thrown, which shouldn't be the case since 13-2022 follows the format 'MM-yyyy'. Invalid command format! Charge date should be formatted as MM-yyyy!

nus-se-script commented 2 years ago

Team's Response

No details provided by team.

The 'Original' Bug

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

Error message for out of range month in 'charge' is inaccurate

If I enter a month out of range, e.g:

image.png

The resulting message is:

image.png

Which is slightly inaccurate because the format is as specified.


[original: nus-cs2103-AY2122S2/pe-interim#3287] [original labels: severity.Low type.FunctionalityBug]

Their Response to the 'Original' Bug

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

Thank you for your review. We understand that the error message might be slightly unclear. However, the resulting message tells the user to input a month and a year, where MM can be anything from 01 to 12 only. Additionally, the user should be able to understand that they have keyed in a wrong input as 13 is an invalid month.

Screenshot 2022-04-18 at 10.43.45 PM.png

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]

Reason for disagreement: The formatting error message will make user think they are not in the right format of keying in the command, where in fact they keyed in an invalid command. An invalid entry message should be shown to the user.

Here is another similar situation in your application where an invalid entry message is thrown rather than a simple formatting error. When using the app command with an invalid month, or date, the error in the second picture is shown, suggesting that the date is an invalid entry, rather than a simple formatting error.

image.png

image.png