erohsikivar / pe

0 stars 0 forks source link

Add command allows duplicate contacts #3

Open erohsikivar opened 10 months ago

erohsikivar commented 10 months ago

Add command allows the user to add duplicate contacts, for example, if I add a new student Alex Lim whose contact number is same Alex Yeoh. It does throw any error.

image.png

As shown in the picture above, it allows the user to add person in same contact number. This can be prevented similar to how you handle duplicate names.

soc-se-bot commented 10 months ago

Team's Response

No details provided by team.

The 'Original' Bug

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

No warning when adding people with same phone number and address

Description: Only duplicate names are checked for, and people with the same phone number and address can be added as long as they have a different name.

To reproduce: Use the add command with a different name from all the other contact entries, but match the phone number, email address and address you supply with one of the pre-existing contact entries.

Expected: display error message saying "user already exists" or something to that effect. Either that, or a warning to warn the user in case it was a typo of the name.

Actual: No error message is displayed and the person is added to the contact list.

image.png

The current behaviour of the app is problematic because in the real world, it is expected for two different students to have two different address and phone number. If the user accidentally enters bad data (for example, two people with the same phone and address), then they would not be notified. Also, there are many common names in the world, and identifying a person solely by their name is therefore insufficient.

An error message, or at least a warning, would be nice!


[original: nus-cs2103-AY2324S1/pe-interim#4625] [original labels: severity.Low type.FeatureFlaw]

Their Response to the 'Original' Bug

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

We have clearly stated in our UG that contact number and address Need not be unique. For example, siblings may share the same address, and wish to put their mom's contact number.

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: [replace this with your explanation]


## :question: Issue response Team chose [`response.Rejected`] - [x] I disagree **Reason for disagreement:** Even though you have mentioned that contact number and address "need not be unique" in UG. I agree that address can be same in some cases but I do not agree with having contact numbers, as this application is designed for NUS counsellors to manage appointments with students. Two students will never have same contact number, also as you have mentioned that siblings might give their mom's contact number it happens in a very rare occasion to give your mom's number. There are chances where you might accidently key in wrong contact number for two different students (even though they are not siblings) and if the user does not encounter any warning then the user won't be able to contact the student whenever needed. However, you could have mentioned this in your future enhancements to work on this duplicate contact numbers. Hence it is still a valid bug.
## :question: Issue severity Team chose [`severity.Low`] Originally [`severity.High`] - [x] I disagree **Reason for disagreement:** When are large number of student entries (let's say more than 50), there are chances that user might input duplicate contact numbers unknowingly. So it is important to prevent duplicate contact numbers and hence the severity is not low as it can happen more often when there are large number of entries.