ltzehan / pe

0 stars 0 forks source link

Load from save file does not perform data validation #11

Open ltzehan opened 1 year ago

ltzehan commented 1 year ago

The loading from save file does not perform validations that is done in the program:

SniffAppointments.txt:

C14328031C | 2023-12-12 | 23:00 | Lulu | Cat | Jon | 91919199
C14328031C | 2023-12-12 | 23:00 | Not Lulu | Not Cat | Not Jon | 91919199

When the program is run, both entries are loaded:

image.png

This messes up the delete logic subsequently:

image.png

This is a moderately important issue as the user may accidentally modify the save file as it is a human-readable file. The program should ensure that an invalid save file should not be loaded to ensure there will be no future issues from using invalid state.

nus-pe-bot commented 1 year ago

Team's Response

This version of the application is meant to have a save file that contains all required data in the proper format such that the appointmetns are able to be loaded successfully instead of crashing the program.

Performing validations that is done in the program is not part of the current scope.

Items for the Tester to Verify

:question: Issue response

Team chose [response.NotInScope]

Reason for disagreement: If no validation is performed on the save file, that is itself a bug since the application must expect users to modify the data, and it is more than likely for a user to input inconsistent data. This is part of the tP constraints:

image.png

In this case, the user may copy and paste rows to keep the formatting, but forget to change the UID / very miraculously manually generate an identical UID. Hence, such validation should be within the project scope.


## :question: Issue type Team chose [`type.FeatureFlaw`] Originally [`type.FunctionalityBug`] - [x] I disagree **Reason for disagreement:** This could honestly be either; personally I regard this as a bug in the save/load functionality, but it can be regarded as a design flaw in the save/load feature as well.
## :question: Issue severity Team chose [`severity.VeryLow`] Originally [`severity.Medium`] - [x] I disagree **Reason for disagreement:** See the issue raised above with how users should be allowed to modify the save file directly -- this may not be a small percentage of the target demographic