NGXZS / pe

0 stars 0 forks source link

Auto-format search results without informing user #6

Open NGXZS opened 5 months ago

NGXZS commented 5 months ago

Description

Auto-format search results without informing user

Reproduction

Add item i11 as shown below search -e 29-02-2025..

Error Message

Actual

image.png

Expected

program to prompt user "no such date exist, searching from 28-02-2025 instead" etc as user may not know future dates don't exist

nus-pe-script commented 5 months ago

Team's Response

Duplicate of #1795 as fixing one fixes both.

The 'Original' Bug

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

Invalid expiry date

image.png

input an invalid expiry date for an inventory item but managed to add, item added with a different expiry date


[original: nus-cs2113-AY2324S2/pe-interim#1597] [original labels: type.FunctionalityBug severity.High]

Their Response to the 'Original' Bug

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

This is an interesting catch. I was able to reproduce this bug using different dates, such as 31-02-2025 (which is resolved to 28-02-2025), or 31-06-2024 (which is resolved to 30-06-2024).

I have done a bit of research on this, and this appears to be an odd quirk of the java.time.format.DateTimeFormatter class.

This was an oversight on my part, as I wasn't aware of the different types of year formatters that can be used.

I thus accept that this is a valid bug, however, I do not agree with the bug severity.

In most cases, invalid dates are appropriately handled by the application (i.e., if I were to pass in something like 30-30-2030, the application correctly recognizes that this is seriously invalid and will reject the user's input).

In this case, while the provided date is invalid, the resolved date is valid. The application does not crash or become unusable due to this bug, and hence a High severity is unjustified here.

Furthermore, I also believe that this issue does not hamper the user's ability to use the product. In such cases, if a user were to input a date like 31-04-2024, it is extremely likely that they were simply mistaken, with respect to the number of days in a month.

Assuming that they intended to input the last day of the month as the item's expiration date, our application will correctly resolve the date accordingly (to the correct date). No usability issues are created for the user, and to reiterate on my previous point, this is a rare occurrence. Thus, Medium severity is not justified as well.

Therefore, I believe, and accept, that this bug is of a 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 type Team chose [`type.FunctionalityBug`] Originally [`type.FeatureFlaw`] - [x] I disagree **Reason for disagreement:** The main problem specified by my bug report is "when the user inputs a non-existent date, program will **auto format it without informing** the user". Here, the **lack of notification** to the user is the `FeatureFlaw` (ie "not complete", as a **complete feature would inform** the user, then handle the date by auto-formatting it. See guidelines below: ![image.png](https://raw.githubusercontent.com/NGXZS/pe/main/files/8e399a42-9114-4873-b46d-fccaddcc9c57.png) I can see why the team and the duplicate term it as a `FunctionalityBug` as "it does not work as expected" (ie state whatever date the user input) ![image.png](https://raw.githubusercontent.com/NGXZS/pe/main/files/af5ce3e9-1093-4133-9524-b34cdefe8954.png) In this case, I feel both sides have equally valid points. As per the guidelines below, **both types can be accepted**: ![image.png](https://raw.githubusercontent.com/NGXZS/pe/main/files/c3c9f2c6-6b0a-4531-bb66-082b22bad011.png)