ganhongyao / pe

0 stars 0 forks source link

Address book gets wiped after invalid person name by modifying data file #6

Open ganhongyao opened 2 years ago

ganhongyao commented 2 years ago

After modifying data file to invalid name e.g. "@@@", the address book gets wiped out. Exiting the app after that means that the storage file is wiped out as well. There is no way of recovering the data.

Steps to reproduce

  1. close app
  2. edit storage file by changing the name of person to "@@@"
  3. open app
  4. all data is deleted
nus-pe-bot commented 2 years ago

Team's Response

No details provided by team.

The 'Original' Bug

[The team marked this bug as a duplicate of the following bug]

Corrupt JSON Data

Steps to Reproduce:

  1. With Dash closed, open one of the files in ./data.
  2. Modify the values such that data becomes invalid.
  3. Run Dash.

In my case, I modified a value in ./data/addressbook.json to have an invalid email (missing domain). image.png

Expected:

  1. Some sort of error message, or error handling where the corrupt data is reset to its default value/ that entry is void.

Actual Result:

  1. The entire list is wiped.

image.png

Such a result was not expected, and should have been documented in the User Guide to explain why such a situation could occur.


[original: nus-cs2103-AY2122S1/pe-interim#2005] [original labels: type.FunctionalityBug severity.High]

Their Response to the 'Original' Bug

[This is the team's response to the above 'original' bug]

Since we never mentioned editing the JSON file as a possibility in the User Guide, a user who edits this file is doing so at their own discretion (most users will not think of doing this). This bug is rare and will only happen to advanced users.

While we feel that it is reasonable to expect these advanced users to understand that editing a JSON file used for storage comes with some risk, we do agree that we could have documented this better.

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: [replace this with your explanation]


:question: Issue type

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

Reason for disagreement: [replace this with your explanation]


:question: Issue severity

Team chose [severity.Low] Originally [severity.High]

Reason for disagreement: Should be of high severity because if the user chooses to meddle with the Json file (even without the UG prompting them to), it leads to disastrous consequences.