ziiqii / pe

0 stars 0 forks source link

Error message could be more specific for dates when using linkloan #2

Open ziiqii opened 7 months ago

ziiqii commented 7 months ago

image.png

Details:

Suggestion:

nus-se-bot commented 6 months ago

Team's Response

This is a duplicate of #5485 due to similar case (invalid date).

The 'Original' Bug

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

Incorrect handling for 29 of Feb

command used: linkloan 1 v/500.00 s/2023-02-29 r/2025-02-15

used on preset data, person 1.

image.png

For years that doesn't have 29th of Feb, the app does detect that this is a invalid date but how every the error message only mention that "Dates should be of the form yyyy-MM-dd" but 2023-02-29 is indeed in yyyy-MM-dd format.

From this the user may not notice that the date they input is invalid but think that they used the invalid formatting for the date.


[original: nus-cs2103-AY2324S2/pe-interim#5403] [original labels: type.FunctionalityBug severity.VeryLow]

Their Response to the 'Original' Bug

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

Hi! This is a feature flaw and not a functionality bug. The error message says that one condition is that "the loan start date must be before the return date". In this case, the loan start date is not before the loan return date as the start date 2023-02-29 does not exist (an invalid date cannot be before the return date as the former, being nonexistent, is not comparable in terms of "before" and "after"). Therefore, the condition that "the loan start date must be before the return date" is violated (i.e. it is NOT the condition that "Dates should be of the form yyyy-MM-dd" that is violated) and the error message is accurate, albeit ambiguous. We agree that the error message could be more specific about what is causing the issue, which is the invalid loan start date, and hence this is a feature flaw.

In our DG Planned Enhancements, we state that we want to improve the error message handling of the linkloan command to be less ambiguous, specifically with date handling, as below:

image.png

Therefore, this feature flaw falls under that category and can be rejected.

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 response Team chose [`response.Rejected`] - [ ] I disagree **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.VeryLow`] Originally [`severity.Low`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]