junianob / pe

0 stars 0 forks source link

Corrupted Tag JSON file breaks tag function #4

Open junianob opened 1 year ago

junianob commented 1 year ago

image.png

When editing the JSON tag file incorrectly, running tags on the program still works but incorrectly.

image.png

Users may face this issue when editing JSON files themselves or when importing this data from shady sources. A solution could be to throw an error to let the user know that the file is corrupted.

soc-se-bot commented 1 year ago

Team's Response

If you edit the json tag file incorrectly, then you should not expect the file to work as a tag file.

The 'Original' Bug

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

Wrong json url does not result in error

Editing the url in json storage to not follow the format as stated does not result in error (ww. instead of www.)

image.png


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

Their Response to the 'Original' Bug

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

Directly editing data files is meant for advanced users and should be done at their own risk.

image.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: The issues caused by a corrupted tag and a corrupted library are 2 separate matters.


## :question: Issue response Team chose [`response.Rejected`] - [x] I disagree **Reason for disagreement:** ![image.png](https://raw.githubusercontent.com/junianob/pe/main/files/98a22c31-18a4-4567-ada7-6703e635aefc.png) There is NO VISUAL DIFFERENCE and NO WARNING MESSAGES when the "tags" JSON file is corrupted as shown above. Using the "addtags" command on the left will add a tag as usual, but using the command on the right will completely erase all previous tags with a new one. ![image.png](https://raw.githubusercontent.com/junianob/pe/main/files/6862e7c8-bc8c-4d86-82b5-ad735a1b6036.png) The error message is incorrect too. It does not "discard all data and start with an empty data file at the next run", instead it keeps the corrupted data file on subsequent runs until a command causes a modification to the corrupted file. ![image.png](https://raw.githubusercontent.com/junianob/pe/main/files/6b52b531-bc1a-4268-82c8-811895384eb6.png) corrupted data file still present even starting "the next run". In fact this should be high.