wongwh2002 / pe

0 stars 0 forks source link

Improper Handling of Error when handling Corrupted File #10

Open wongwh2002 opened 1 week ago

wongwh2002 commented 1 week ago

image.png

In this case I have added my phone number wrongly in the first line, Name: james | NRIC: X9123457A | Phone Number: 8123456 | Date_Of_Birth: | Home Address: | Allergy: [] | Sex: | Medical History: [] | Visit: [21-10-2024 15:38, Diagnosis: [], Medications: []];

Program does not tell me where I am wrong (line number, or even which entry is wrong), and forces me to delete the whole file, or read line by line to find my own mistake

Is a high severity as the data of a General Practitioner clinic will be very big and the doctor should not need to re-enter every patient's details if 1 of it is edited wrongly

Same type of error if input for date (wrong formatting too), NRIC and other parameters

I realised program does not even tell you which file is wrong ("bookbob_appointment.txt" or "bookbob_data.txt"), all users would have to delete both files if they are not able to find out which line is entered incorrectly

soc-pe-bot commented 4 days ago

Team's Response

Hi Tester, Thank you for your Description of Issue and Feedback.

reasonable points.

However, a normal clinician will not manually edit the data file. We have already given a caveat in DG to not manually modify data file contents:

image.png Hence, this will only cause minor inconvenience to some users who choose to disregard the caveat and manually modify the file contents (we think that the severity is medium).

We have already handled the edge case of data corruption errors.

However, we do agree with you to some extent that there could be much stronger/powerful detection and guidance for data file corruption errors.

Items for the Tester to Verify

:question: Issue type

Team chose [type.FeatureFlaw] Originally [type.FunctionalityBug]

Reason for disagreement: image.png I would think this is a functionality bug, particularity "A legitimate user behavior is not handled e.g. incorrect commands, extra parameters", where in this case the user behaviour is to for advanced user to change the files directly, but he accidentally write an invalid format (similar to incorrect commands).


## :question: Issue severity Team chose [`severity.Medium`] Originally [`severity.High`] - [x] I disagree **Reason for disagreement:** ![image.png](https://raw.githubusercontent.com/wongwh2002/pe/main/files/1924dadd-3efe-431b-b2ac-bf40950a6460.png) I argue that it is in the TP constraint for the file to be manually modified, particularly for more advanced users. It is therefore not valid to say in the DG that users should not be able to modify the file contents. In one of the lectures, Prof Akshay has also specifically mentioned that error handling should be made for loading from storage. To add, losing both entire data files is not just a minor inconvenience, as users would have to input hundreds or thousands of data again just because one of the parameters is formatted wrongly. The program also does not mention which part of the file is wrong, and just crash when the users try to run it. ![image.png](https://raw.githubusercontent.com/wongwh2002/pe/main/files/00fa330e-11b1-4c54-a662-fab5829f502c.png) I would argue that this severity is high as it crashes and would be unusable for any users that edit the data file, which would be most users in the scope of our TP.