You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the application, there is validation to ensure that the address book does not contain duplicate people (all with the same fields). However, through the tags, it is possible to bypass this.
Steps to reproduce
Launch the application.
Run clear to reset application data.
Run add contact -n John Doe -p 98765432 -e [email protected] -a 311, Clementi Ave 2, #02-25 -t frontend
Run add contact -n John Doe -p 98765432 -e [email protected] -a 311, Clementi Ave 2, #02-25 which is the same as above but without the tag
Run add tag -id 2 -t frontend to make the second contact equivalent to the first
Run exit to save the data
Relaunch the application
Expected behaviour
At step 5, the application should let the user know that this command would result in a duplicate person, invalidating the command. Additionally, since the application allows for step 5 to carry on, it should update the UI to reflect the added tag to contact 2.
Actual behaviour
Step 5 carries on as usual, though without updating the UI and displaying the newly added tag to the second contact, allowing the application to store 2 duplicate people. The final state of data/addressbook.json file below that proves this.
Description
In the application, there is validation to ensure that the address book does not contain duplicate people (all with the same fields). However, through the tags, it is possible to bypass this.
Steps to reproduce
clear
to reset application data.add contact -n John Doe -p 98765432 -e [email protected] -a 311, Clementi Ave 2, #02-25 -t frontend
add contact -n John Doe -p 98765432 -e [email protected] -a 311, Clementi Ave 2, #02-25
which is the same as above but without the tagadd tag -id 2 -t frontend
to make the second contact equivalent to the firstexit
to save the dataExpected behaviour
At step 5, the application should let the user know that this command would result in a duplicate person, invalidating the command. Additionally, since the application allows for step 5 to carry on, it should update the UI to reflect the added tag to contact 2.
Actual behaviour
Step 5 carries on as usual, though without updating the UI and displaying the newly added tag to the second contact, allowing the application to store 2 duplicate people. The final state of
data/addressbook.json
file below that proves this.This results in the application being launched at step 7 with no data as the storage detects duplicate people.
Ideas
Perhaps the add tag command could provide some validation to ensure that the edited person is not a duplicate.
Labels:
severity.High
type.FunctionalityBug
original: nathanielcalimag/ped#12
The text was updated successfully, but these errors were encountered: