nus-cs2103-AY2324S2 / pe-dev-response

0 stars 0 forks source link

No error thrown when Json file has been incorrectly edited #2482

Open nus-se-script opened 4 months ago

nus-se-script commented 4 months ago

Details: When editing the Json file incorrectly (apart from the InterviewDate field), the application will restart from a clear state. However no error message was prompted by the application.

Steps to reproduce:

  1. Have at least 1 interview application in the application
  2. Exit the application.
  3. Go to current application directory/data/addressbook.json
  4. Open the file in your file editor of choice
  5. Change the name to the tag to test such as "tag" : "test",
  6. Save the file
  7. Reopen the application.

Expected: An error message to indicate that the reading the JSON file has resulted in an error.

Actual: The application runs with no error message prompted and the state cleared.

Screenshots:

image.png

image.png

Rationale: This is not ideal as users are not perfect and may forget that special words in tags are not supported. Furthermore, no error message is prompted at all, causing them to be confused. Additionally, after Step 7, they may realize their mistake, and close the application to fix the Json file, in which case their JSON file is overridden permanently with an empty storage template, causing them to lose their pre-existing data forever.

image.png


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

eunrcn commented 4 months ago

Team's Response

We did caution users against editing the json file wrongly as it may result in clearing the data

Screenshot 2024-04-20 at 5.23.39 PM.png

Duplicate status (if any):

--