Open JamesLiuZX opened 1 year ago
No details provided by team.
[The team marked this bug as a duplicate of the following bug]
Reported Date Allowed to be in the Future
Steps to Produce
- Enter a reported date in the future, for example:
edit 1 d/2023-01-02
- Submit the input.
Expected Behavior The input should be rejected with an appropriate error message, informing the user that the reported date cannot be in the future.
Actual Behavior The input is accepted without any error message.
Justification Allowing reported dates in the future can lead to incorrect data and confusion for users. The system should not allow dates in the future and provide clear error messages to guide the user in correct usage. This doesn't make sense as the field is named as Reported date.
[original: nus-cs2103-AY2223S2/pe-interim#4009] [original labels: type.FunctionalityBug severity.Medium]
[This is the team's response to the above 'original' bug]
Hi!
Thanks for pointing that out! You're right that cases from the future should not be allowed to be entered into the app, and we could have shown an error message instead.
However, this validation was not part of our project scope at the time; we focused instead on more general date and date format validation.
Checking for dates in the future is something we might consider doing in a future version of the product, so we see this bug report as being not in scope.
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: The other bug focused on being able to input dates in the future, mine also highlights the fact that the regex accepts both the past and the present (0000 to 9999) instead of (1xxx- 2xxx), and the fact that it should be set to from current date minus the maximum allowable age which is 199 as set by your team, to the current date.
The range seems to go from 0000 to 9999 in years. The range should be calculated from the maximum allowable age which is 199 as set by your team, and dates from the future should not be able to be added.