mitchmalvin1 / pe

0 stars 0 forks source link

Invalid command for `add` uncaught #4

Open mitchmalvin1 opened 1 year ago

mitchmalvin1 commented 1 year ago

Screenshot 2023-04-14 at 4.39.04 PM.png

Screenshot 2023-04-14 at 4.41.10 PM.png

When the user runs card add d -q QN -a ANS , the extra d after the add is uncaught and the card is still added. This is definitely undefined behaviour as the UG only mentions that duplicated options will be ignored except the last but did not say anything about arguments that do not belong to any options like the d in the command above.

nus-pe-bot commented 1 year ago

Team's Response

No details provided by team.

The 'Original' Bug

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

Certain words are ignored input

Input:

add [RANDOM WORDS] /q [QUESTION] /a [ANSWER]

add can be replaced with clear, help, review, bye

Expected:

The input is in an incorrect format.
You can view our user guide or type help to see the correct formats for commands.

==========================================================

Actual:

You have added the following card:
Q:[QUESTION]
A:[ANSWER]
==========================================================

Proof:

image.png

Cases where extra words are not ignored: list all [RANDOM WORDS]

image.png

Apologies if this is an intended behaviour.


[original: nus-cs2113-AY2223S2/pe-interim#2026] [original labels: severity.Low type.FeatureFlaw]

Their Response to the 'Original' Bug

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

It is the intended behavior for the program to ignore the text not behind any option function (eg: /q). I believe that our user guide already indicates that when adding a question by add /q QUESTION /a ANSWER, only QUESTION and ANSWER would be recorded into the system.

The program tries its best to recover from user mistakes, by ignoring options that are not relevant to its operation, instead of throwing completely and forcing the user to retype. It doesn't allow typo so you can't get away with reviuw but it will ignore arguments it don't care if they exist, and that's entirely by design.

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`] - [x] I disagree **Reason for disagreement:** Similar reason to all my previous response, the UG only accounts for the case where there are multiple options, not **trailing arguments that do not belong to any options**. The team cannot say that it is the intended behaviour because it clearly is not, and it is also not mentioned in the documentation at all. I believe this is a very valid bug that the team cannot cover up. If it really is the intended behaviour, it would have been mentioned in the guide just like how they anticipated the multiple-option bugs in the UG and mentions that it will be ignored.