Open prave1n opened 1 week ago
Both issues indicate that the application needs a more robust duplicate detection mechanism that goes beyond just checking NRICs, incorporating other key attributes to prevent unintentional duplicate records. Thus, #2666 is effectively a duplicate of #2372, as they both propose a similar enhancement to improve data integrity and prevent user errors.
[The team marked this bug as a duplicate of the following bug]
Duplication handling does not consider email and phone number.
Description Duplication of email and phone number is allowed.
Steps to reproduce error:
- Open the .jar application
- Type
edit s1234567a p/ 99272758
(this is a duplicate phone number of the sample contact Bernice Yu)Expected Output A warning/error message that says you cannot edit the person to have duplicate email/phone number.
Actual Output The command goes through.
Reason for severity Medium. It is uncommon for 2 patients to have the same phone number. Thus, when such cases happen, it is likely due to a typo. Hence, the application should warn the user that there is a duplicate phone number :,)
[original: nus-cs2103-AY2425S1/pe-interim#3228] [original labels: severity.Medium type.FeatureFlaw]
[This is the team's response to the above 'original' bug]
We appreciate the concern about potential typographical errors leading to unintended duplication of contact information. However, we believe that allowing duplicate phone numbers or emails is beneficial for the following reasons:
Phone numbers and emails are sometimes shared between multiple individuals. For example:
- Parent who is managing medical appointments for their children
- Guardians / LPA donees caring for someone not able to manage their own contacts
- Aging elders or minors under care of guardians who do not have their own point of contact
Avoiding Overzealous Input Validation: Restricting contact information to unique values only could lead to frustrations, who may intentionally use duplicate values across different patients for valid reasons.
User Responsibility: We believe that users should review their inputs for accuracy, especially in cases where contact information is shared. Typographical errors can be mitigated by user vigilance.
Future Improvement
We will make this clearer in the User Guide about why this is an intended feature in the future. This will help users understand the rationale behind allowing duplicate contact details and avoid potential confusion :'(
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]
Steps to reproduce:
add n/John Doe i/S9999999A d/2000-01-01 g/M p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25
add n/John Doe i/S9999999B d/2000-01-01 g/M p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25
Expected Output: Although it has been mentioned in the UG that duplicates will only be flagged if an existing patient has the same NRIC, it is unreasonable to expect two patients with exact matching details except for having different NRICs. Hence, I would expect the app to throw an error alerting the user that they may be adding a duplicate patient
Actual Output: Both commands were executed and two patients with almost identical details were added to the address book
Potentially problematic behaviour: There is a good chance that the user keying in the details had just made an error when entering the NRIC. This could lead to the user accidentally adding duplicate patients without being aware. It would be beneficial to add further checks to see if all other key information like their phone number, email address and residential addresses match as well to warn the user.