nus-cs2103-AY2021S1 / pe-dev-response

0 stars 0 forks source link

Inconsistent error message for update command #5926

Open nus-pe-bot opened 3 years ago

nus-pe-bot commented 3 years ago

-1 and 10 are both invalid indexes, but executing update -1 n/Push Up shows invalid command format while update 10 n/Push Up shows The exercise index provided is invalid.

Screenshot 2020-11-13 at 4.18.03 PM.png

Screenshot 2020-11-13 at 4.18.35 PM.png


[original: nus-cs2103-AY2021S1/pe-interim#5909]

leeweiminsg commented 3 years ago

Team's Response

Thank you for the feedback.

This is a duplicate of #5900.

In the update section of our user guide (https://github.com/AY2021S1-CS2103T-W17-2/tp/blob/master/docs/UserGuide.md#33-update-exercises--update), it states that a valid command format must be of the form:

"update INDEX [n/EXERCISE] [d/DESCRIPTION] [at/DATE] [c/CALORIES] [m/MUSCLE]... [t/TAG]..."

, where "The index must be a positive integer 1, 2, 3, …​".

In the first case ("update -1 n/Push Up"), the index provided is a negative integer, hence it is an invalid command format (as specified by the user guide).

In the second case ("update 10 n/Push Up"), the index provided is a positive integer, hence it is a valid command format. However, the index exceeds the number of exercise records (7 as shown in the picture), so it is an invalid index (in the context of the valid command).

Since the error message aligns with the instructions given in the user guide, it is not a functionality bug. It is neither a feature flaw nor a documentation bug since we are not missing any features and we intend for the error formats to be that way. Our update command is closely aligned with the edit command (https://se-education.org/addressbook-level3/UserGuide.html#editing-a-person--edit) in AB3.

Even if this is really a bug, this behavior was inherited from AB3, so we will reject it anyway.

Please view https://nus-cs2103-ay2021s1.github.io/website/admin/tp-pe.html#pe-phase-2-developer-response-2 for more information.

Therefore our team rejects this bug report.

Duplicate status (if any):

--