appleshill / pe

0 stars 0 forks source link

Lack of datetime validation for appointment creation #11

Open appleshill opened 1 week ago

appleshill commented 1 week ago

Screenshot 2024-11-15 at 5.15.43 PM.png Screenshot 2024-11-15 at 5.17.03 PM.png

Issue: Appointments can be created with invalid dates/times, eg 2025-02-31 (there is no 30/31 Feb in any calendar year), and there will be a success message shown. However, when details are later viewed using the view command, for either patient or doctor, there is a message saying an incomplete appointment, with a date different from what was entered.

To replicate, use the following commands (assuming default data in the app): createD n/Dr Jane Smith p/87654321 e/dr.jane.smith@hospital.com a/456 Elm Street (this should be doctor with index 1) addA z/10 z/1 x/2025-02-31 00:00 view z/10

nus-se-bot commented 6 days ago

Team's Response

No details provided by team.

The 'Original' Bug

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

Able to add appointment on an invalid date

I am able to add an appointment on 2023-02-29, which is supposed to be invalid since it is not a leap year. However, they sucessfully added the appointment, and automatically change the appointment date to 28th of February.

Screenshot 2024-11-15 at 4.50.52 PM.png

Screenshot 2024-11-15 at 4.50.59 PM.png


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

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 type Team chose [`type.FeatureFlaw`] Originally [`type.FunctionalityBug`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]
## :question: Issue severity Team chose [`severity.Low`] Originally [`severity.Medium`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]