dasha3412 / pe

0 stars 0 forks source link

Lack of input validation for 'Date Last Seen' field of contacts #2

Open dasha3412 opened 4 days ago

dasha3412 commented 4 days ago

Steps to Reproduce:

  1. Enter command edit 4 d/19-02-2025 (assuming current date is earlier than 19-02-2025; for example, current date is 15-11-2024)

Expected Behaviour: System should not modify the Date Last Seen of contact 4 and should notify the user that the date entered is after the current date.

Actual Behaviour: System allows the Date Last Seen of contact 4 to be changed to a date in the future.

Screenshot of Behaviour:

Screenshot 2024-11-15 at 4.34.57 PM.png

Screenshot 2024-11-15 at 4.39.08 PM.png

Note: Command was executed in the screenshots when in filtered view, so modified contact has a different index to the command entered.

Explanation Given the field is Date Last Seen, it would be impossible for the user to have been last seen at a date that is in the future. Therefore, the system should not allow the user to enter a date for this field later than the current field. This has medium severity as the date last seen might be very important to the target user in identifying exactly where in their internship journey they might have interacted with someone so, if they make a mistake (which happens often, especially with number keys being right next to each other), they will not be notified and might lose important date with regards to when the contact was actually last seen.

nus-se-bot commented 13 hours ago

[IMPORTANT!: Please do not edit or reply to this comment using the GitHub UI. You can respond to it using CATcher during the next phase of the PE]

Team's Response

Hi tester, this is something we had thought of during the inclusion of the last seen date field. We decided to allow last seen date in the future to include versatility. Let me give you an example that my group came up with.

Suppose I am meeting my senior, a Y4 computer science student for interview preparation tomorrow 18-11-2024, and I would like to enter his contact details into NetBook first. The only way for me to do so is if NetBook allows me to put the last seen field as a date in the future.

Furthermore, we think that this is more of a feature flaw rather than functionality bug. This is because we did not specify that the last seen date must before the current date. Hence, it does not deviate from expected behaviour. This is more of an enhancement to NetBook.

As such, while this might be an improvement, we do not believe it provides many benefits to our users compared to the features that we have added, and believe this should be out of scope.

Items for the Tester to Verify

:question: Issue response

Team chose [response.NotInScope]

Reason for disagreement: [replace this with your reason]


## :question: Issue type Team chose [`type.FeatureFlaw`] Originally [`type.FunctionalityBug`] - [ ] I disagree **Reason for disagreement:** [replace this with your reason]
## :question: Issue severity Team chose [`severity.Low`] Originally [`severity.Medium`] - [ ] I disagree **Reason for disagreement:** [replace this with your reason]