luminousleek / pe

0 stars 0 forks source link

No input validation for compatability #10

Open luminousleek opened 2 years ago

luminousleek commented 2 years ago

Bug: Inputting an invalid compatability value does nothing - it doesn't even give an error. According to the logs, there's an assertion failure, but an exception should be thrown instead.

Steps to reproduce: Edit a person's compatability to 101, or input 101 when adding a person's compatability

Editing:

Screenshot 2021-11-12 at 4.58.54 PM.png

Adding:

Screenshot 2021-11-12 at 5.08.04 PM 1.png

Logs:

Screenshot 2021-11-12 at 5.01.22 PM.png

nus-pe-bot 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]

Add/Edit: No error message is displayed when an invalid compatibility is specified

When adding/editing a person with an invalid compatibility, the command result output does not change and no error message is shown to the user after pressing "Enter". This gives the impression that the command was successfully executed, which can cause confusion.

image.png

Steps to Reproduce:

  1. Start application.
  2. Run the command add n/Bob e/bob@gmail.com f/law m/Law compat/200. (Other possible inputs: -1, -400. Also reproducible with edit.)

Expected:

  1. An appropriate error message is displayed to indicate that the inputted compatibility is invalid.

Actual:

  1. The command result does not change and no error message is displayed. The contact list does not change.

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

Their Response to the 'Original' Bug

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

No details provided by team.

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 severity

Team chose [severity.Low] Originally [severity.Medium]

Reason for disagreement: [replace this with your explanation]