Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functionality Bug: All data deleted if duplicate entries are present in json file #2

Open
Jiacheng-y opened this issue Nov 11, 2022 · 1 comment

Comments

@Jiacheng-y
Copy link
Owner

Jiacheng-y commented Nov 11, 2022

This bug is more relevant to advanced users' expereince who may choose to import an external json file into the application

To reproduce the bug,

  1. open the pennywise.json file from the data folder created.
  2. paste the following input into the end of the expenditures list:
{
    "description" : "Lunch",
    "amount" : "7.20",
    "date" : "31-10-2022",
    "tagged" : "Food"
  }, {
    "description" : "Lunch",
    "amount" : "7.20",
    "date" : "31-10-2022",
    "tagged" : "Food"
  }
  1. open the jar file.

All data will be purged without any form of warning. PennyWise will start as a blank application.

This is a bug as the format of the data in the json file is aligned with the json file format. However, the user's data will still be deleted. The UG also only specifies that if the json file format is violated, the data file will be deleted but the above scenario is not covered in the UG. This bug is rather severe because it causes irreversible data loss for the advanced user.

Screen Shot 2022-11-11 at 16.35.33 PM.png

@nus-pe-script
Copy link

nus-pe-script commented Nov 14, 2022

Team's Response

Reason: Our format in the UG refers to PennyWise's format, as PennyWise does not accept duplicates, which is also mentioned in the User Guide. Hence this will still overwrite and discard the data.

image.png

Items for the Tester to Verify

❓ Issue response

Team chose [response.Rejected]

  • I disagree

Reason for disagreement: Thank you for the response. I can see how this may be a documentation bug instead of a functionality bug, and I agree with that.

However, I disagree with the team's decision to reject the bug.

From the team's UG, the only detail given about what "the format" may refer to under the "Editing the data file" section is that "... advanced users with JSON file format...". However, JSON file format does not imply PennyWise's format.
image.png

Furthermore, in the section from the screenshot provided in response by the dev team, there is no mention or warning to advance users about the fact that user edited JSON files cannot contain duplicated entries either.

As the consequence of loading a data file with duplicate entries is dire, it is important for the dev team to explicitly warn the user that user edited JSON files with duplicated entries will be deleted entirely. Expecting all advanced JSON users to infer this from 2 sections more than 12 pages apart is unreasonable.

Furthermore, I would like to highlight that duplicate entries will not be a rare occurrence on the user's end. I am sure the dev team is aware of this as they have dedicated an entire page in the UG about dealing with duplicate entries under the "Guidelines on organising your expenses and income" section.

Thus there ought to be some form of warning somewhere in the UG about PennyWise clearing all data from the JSON file upon detecting duplicate entries from user edited JSON files.


❓ Issue type

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

  • I disagree

Reason for disagreement: [replace this with your explanation]


❓ Issue severity

Team chose [severity.VeryLow]
Originally [severity.Medium]

  • I disagree

Reason for disagreement: I disagree with the dev team's rating of this bug as this is not a cosmetic problem.

This bug should be rated as severity.Medium because of the following 2 reasons:

  1. The consequence of loading a data file with duplicate entries is dire. Loading in a data file only to find all the data deleted upon opening PennyWise will cause a lot of inconvenience to users. Although this bug only affects users familiar with JSON and wishes to edit the data directly from the JSON file, it is important for the dev team to explicitly warn the user that user edited JSON files with duplicated entries will be deleted entirely. Expecting all advanced JSON users to infer this from 2 sections more than 12 pages apart is unreasonable.

  2. This bug likely affects users editing the JSON file rather frequently. Duplicate entries in budgeting is not a rare occurrence. I am sure the dev team is aware of this as they have dedicated an entire page in the UG about dealing with duplicate entries under the "Guidelines on organising your expenses and income" section.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants