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

Editing JSON according to UG clears the data instead #4

Open
jianh0ng opened this issue Nov 12, 2021 · 1 comment
Open

Editing JSON according to UG clears the data instead #4

jianh0ng opened this issue Nov 12, 2021 · 1 comment

Comments

@jianh0ng
Copy link
Owner

jianh0ng commented Nov 12, 2021

In the UG, it is stated "Each ID is made of two hexadecimal numbers separated by a hyphen [hex]-[hex] .
Each ID must be unique among all person entries.
The value of the ID does not matter, so it can have any value, so long as each ID is unique
among all person entries.
If a person belongs to a group, then the person must have an ID and this ID must also
appear in that group’s groupMateIds JSON array."

However, when I edit both the ID for the person and the ID in the group to be the same in the JSON, the next startup starts with the empty data instead, which is not the expected case.

Steps to reproduce:

  1. Start fresh with sample data.
  2. joinG p/1 p/2 g/1
  3. exit
  4. Open the json, below is the current IDs.

image.png

  1. Edit the underlined json as such

image.png

  1. Save.
  2. Start the jar file again.

Expected behaviour is that the app still works because both IDs still match up but in fact it is treated as an error and the data is reset.

@nus-pe-bot
Copy link

nus-pe-bot commented Nov 16, 2021

Team's Response

We actually expected this error. We even wrote tests for it:

image.png

It uses LocalDate and LocalTime internally, so there is a maximum. This is intended behaviour when the maximum is exceeded because the IDs would not be valid. We just did not specify this in the User Guide, so we are changing it to a DocumentationBug.

Items for the Tester to Verify

❓ Issue type

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

  • I disagree

Reason for disagreement: [replace this with your explanation]


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