nus-cs2103-AY2425S1 / pe-dev-response

0 stars 0 forks source link

No error message to warn that date has been changed to closest valid date for invalid dates #1866

Open nus-pe-bot opened 2 weeks ago

nus-pe-bot commented 2 weeks ago

How to reproduce

  1. Add a person with an invalid leap year birthdate , such as 1991-02-29

add n/Ali p/98765432 e/johnd@example.com addr/311, Clementi Ave 2, #02-25 b/1991-02-29 appt/2024-12-12 12:00

image.png

  1. Person is added successfully, but the invalid date is not called out, instead, it silently changes the date to the closest valid date, 28 feb instead

image.png

image.png

As can be seen, Ali has a birthdate on 1991-02-28

Severity Justification

It's good to have some intelligent input validation to change the date to the closest date.

However, this silent changing of the date to the closest date might be bad, because the typo might be in the year, such that the year is supposed to be a valid leap year but was entered wrongly.

E.g. entered 1991-02-29 wrongly instead of 1990-02-29

Even though this behaviour has been documented in the UG, it would be good if there was some indication in the error message instead of just allowing it to go through.

This could lead to wrong records of birthdates which might cause some inconvenience.


[original: nus-cs2103-AY2425S1/pe-interim#795] [original labels: severity.Medium type.FeatureFlaw]

SSirMentos commented 1 week ago

Team's Response

Thank you for your input. This feature is documented in the User Guide, which specifies that invalid dates will be auto-corrected to the closest valid date, the system fails gracefully as there are no errors or loss of functionality hence we will classify this as not in scope. However, we will definitely keep this in mind when implementing future iterations. Thank you

Duplicate status (if any):

--