fahim-tazz / pe

0 stars 0 forks source link

Making duplicates in the JSON file crashes Advis.io #5

Open fahim-tazz opened 1 year ago

fahim-tazz commented 1 year ago

Adding duplicate policies to a client in the JSON file:

image.png

Launching Advis.io again results in the following errors:

image.png

This does not follow the behaviour mentioned in the UG:

image.png

nus-se-bot commented 1 year ago

Team's Response

No details provided by team.

The 'Original' Bug

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

No error message when User edits storage to an invalid JSON format

A core constraint is to ensure the storage is a Human editable file. However, it is not clear what is a "valid" JSON file.

It is easy for the user to make simple errors in the JSON (e.g. duplicate entries) that render it invalid.

The application starts up empty when invalid JSON encountered. However, no error message is given within the application result display.

Furthermore when a user types a command, the empty data will save over whatever previous invalid JSON file existed (which could lead to permanent loss of data).

There should be a warning in the UG or a clear error message so that the user can try and avoid such a situation.


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

Their Response to the 'Original' Bug

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

We clearly state in the UserGuide that advanced users can edit the JSON file directly. We are assuming that advanced users know JSON file format, and are confident enough to edit it directly. We feel that this is a fair assumption.

We also clearly state in the UserGuide the warning that if the JSON file is made invalid the application will discard all the JSON data.

Screenshot 2023-04-16 at 3.50.08 PM.png

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: My issue and the duplicate issue does not reflect the same thing.

My issue is referring to the fact that Advisio does not even start when the JSON file is corrupted. Instead, it crashes with an error.

Expected Behaviour (according to the UG screenshot attached): Advisio will start, but with an empty dataset.


## :question: Issue response Team chose [`response.Rejected`] - [x] I disagree **Reason for disagreement:** There is a clear discrepancy between expected and actual behaviour, when a JSON file entry is corrupted (in this case, duplicated). Expected (according to UG): Advisio **starts**, with an empty dataset. Actual: Advisio does not start, instead throws an error in the terminal. Therefore, this bug is definitely present and should not be overlooked.