Hikoya / pe

0 stars 0 forks source link

Error message for delete should be consistent #3

Open Hikoya opened 2 years ago

Hikoya commented 2 years ago

Description: whenever an invalid index is given (not positive integer) / exceed list size, the same error message should appear for the two scenarios.

Actual: Different error messages

image.png

image.png

nus-se-bot commented 2 years ago

Team's Response

Linked to #2482

The 'Original' Bug

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

Different invalid indexes report different error messages

Description

The error messages are inconsistent when different invalid indexes are used. This means that the user might get confused about why one of the inputs was invalid. This bug isn't about how the 0 input is rejected, but the difference in the resulting error messages.

Steps to reproduce

  1. Start the application.
  2. Type delete book 0 and press enter. Note the error message.
  3. Type delete book n (where n is a number greater than the book list size) and press enter. Note the error message.

Expected

The same error message is encountered.

Actual

Different error messages are encountered.

Screenshot 2022-11-11 at 4.26.59 PM.png

Screenshot 2022-11-11 at 4.27.05 PM.png


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

Their Response to the 'Original' Bug

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

In the first screenshot provided for delete book 0, the error message does state that the INDEX (must be a positive integer) - and 0 is not a positive integer. Thus the user is expected to follow this command format.

In the second command delete book n, n is a positive integer but it is invalid because it exceeds the index displayed on the UI.

Instead of rejecting this bug report (because we feel that the error messages are accurate enough), we decided to accept it because it is possible that the error message can be better written. So as per the CS2103 recommendation, we are changing this to be a FeatureFlaw.

Reason for change to FeatureFlaw that is NotInScope: The error messages are as expected, but it is arguable the error message for delete book 0 does not emphasise that 0 is not a positive integer, which is a feature enhancement.

image.png

image.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.NotInScope]

Reason for disagreement: [replace this with your explanation]


:question: Issue type

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

Reason for disagreement: [replace this with your explanation]