alex-setyawan / pe

0 stars 0 forks source link

Unspecified behaviour for some invalid dates in "add" command #4

Open alex-setyawan opened 2 months ago

alex-setyawan commented 2 months ago

When inputting dates for the "add" command, using some invalid dates such as 30-02-1990 automatically changes the date to the nearest valid date, but this is unspecified in the user guide.

Steps to reproduce:

  1. Type "add ic/2354944F n/John Doe p/91234567 e/johndoe@email.com g/M b/30-02- 1990 d/Paracetamol | Penicillin i/Infectious Diseases"

  2. Press "enter"

The result is as follows:

image.png

soc-pe-bot commented 2 months ago

Team's Response

This can be seen as duplicate of #5289

The 'Original' Bug

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

ADD Feature does not match the expected behaviour of data handling

Steps to reproduce:

  • As per the UG, I have inputted add ic/S0944567D n/John Doe g/M b/29-02-2023 p/98760432 e/johnd@example.com d/Penicillin|\nCephalosporins i/Infectious Diseases i/Genetic Disorders.

Expected:

  • I was expecting to get an error message since 2023 is not a leap year and 29th Feb only exists on leap years.

Actual:

  • However, I got a success message instead.
  • This is problematic as this is not a valid input and should have been caught by the system to ensure that information are keyed in correctly.

Screenshots:

image.png


[original: nus-cs2103-AY2324S2/pe-interim#5074] [original labels: type.FunctionalityBug severity.Medium]

Their Response to the 'Original' Bug

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

The team has actually noted about this issue prior to v1.4 and the application instead ensured to not have an overzealous validation for the date and instead have a "feature" such that it would automatically parse invalid dates into the nearest valid date. In the example, 29-03-2023 is parsed to 28-03-2023 under the hood. Perhaps in future releases, we would include warning messages as well to make it clearer. So as of now, we would accept it as NotInScope and of Low Severity.

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`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]