maiyasaliha / pe

0 stars 0 forks source link

Adds incorrect date for appointment when invalid date is added #6

Open maiyasaliha opened 4 months ago

maiyasaliha commented 4 months ago

When creating an appointment for 30th of Feb 2025, MediCLI creates an appointment for the 28th instead.

Example: addappt ad/2025-02-30 10:15 dn/S1234567B pn/S1234567A

It is expected to say invalid date as the date does not exist, however it assumes and adds an appointment for the last day of Feb in 2025 instead.

This might be problematic as the appointment might have been for march instead of feb, being a typo, however without checking with the user, an appointment for the last day of Feb is added.

image.png

nus-pe-bot commented 4 months ago

Team's Response

This is a good find - thanks for that. However, we think this is a low severity issue because this is unlikely to occur in normal operations - one would have to both type '2' as the month and '30'/'31' as the date, which is the only way to actually face this situation. In other words, such a fix would benefit someone only very rarely. As we think the chances of this happening, especially in regular use, is very very small, we think that the severity should be downgraded.

Items for the Tester to Verify

:question: Issue severity

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

Reason for disagreement: severity.Low : A flaw that is unlikely to affect normal operations of the product. Appears only in very rare situations and causes a minor inconvenience only. severity.Medium : A flaw that causes occasional inconvenience to some users, but they can continue to use the product.

Only February does not have a 30th day. Other than that, all of the other 11 months do. Hence the chances of this happening are actually not very very small if '2' as the month was a typo, could have been '1', '3', '12', or any of the other 11 valid months. In such a case the application should alert the user that it is an invalid date instead of scheduling an appointment for an autocorrected wrong date. The actual date for the appointment is also lost and this might cause a lot of inconvenience for users thinking that the appointment was correctly scheduled but it was scheduled for an entirely different date instead. Moreover, this also means that users will not be able to add appointments actually meant for that specific date as there already exists an incorrect appointment in its place.

As such the severity of this bug remains to be Medium.