STeng618 / pe

0 stars 0 forks source link

Data corruption #8

Open STeng618 opened 2 months ago

STeng618 commented 2 months ago

Insert some valid calorie entries.

While the application is running, delete the data directory to simulate data corruption.

Do calories list to verify that the data entries are preserved.

Quit and relaunch the application. The data is lost.

User is not informed of the data loss

soc-se-bot commented 2 months ago

Team's Response

Hi there, thank you for your bug report!

As mentioned in our UG, the text file is only updated when the following functions are invoked (see attached).

image.png

As such, users should exercise caution and only make changes to the file accordingly. Moreover, it is not necessary to inform the user that the data file has been deleted, when the user themselves have deleted the file.

Hence, we have rejected this as a bug.

Thanks.

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: The point is that the application does not handle the case of data loss due to unforeseen circumstances such as files being corrupted/deleted (perhaps due to power outage or admin permission errors), not because users manually edit the data files. There is no reason why this cannot be done as the application still has all the data as Java objects and this issue can be easily resolved if the application simply checks for the existence of the data files after each command that changes the data, and recreates them if they do not exist in the data folder before any write operations.

However, I understand that this situation is extremely rare, and thus the severity label - low as per the course guidelines.