Song-Mengfei / pe

0 stars 0 forks source link

Unexpected output for `appt` command #8

Open Song-Mengfei opened 10 months ago

Song-Mengfei commented 10 months ago

I add an inccorct DATE_TIME (29-02-2025) to the appt commnand line, there is no error message and changes the date to (28-02-2025).

Screenshot 2023-11-17 at 16.49.50.png

image.png

soc-pe-bot commented 9 months ago

[IMPORTANT!: Please do not edit or reply to this comment using the GitHub UI. You can respond to it using CATcher during the next phase of the PE]

Team's Response

duplicate error found as per #5836

The 'Original' Bug

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

When adding an appointment, an invalid date is automatically changed to a valid date without any error messages.

If an invalid date is entered for an appointment, the date is automatically changed to a valid date and the appointment is created with no error message being shown. Instead, an error should be shown.

image.png

Steps to reproduce:

  1. Add a patient and a doctor.
  2. Enter the command appt /for 1 /doc 1 /d ABCD /on 31-02-2024 10:00.

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

Their Response to the 'Original' Bug

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

Thanks for pointing it out! Accepting it but moving it to a low severity - it is unlikely that such a date will be inputted, and this is specific to the month of february (because of the leap year). Also, this is as a result of the java import of LocalDateTime, which is not able to properly parse for these rare edge cases

as seen below, works for other months Screenshot 2023-11-18 at 5.51.26 PM.png Screenshot 2023-11-18 at 5.51.43 PM.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 reason]