DINESH1201 / pe

0 stars 0 forks source link

Duplicate emails should not be allowed #3

Open DINESH1201 opened 1 week ago

DINESH1201 commented 1 week ago

In a company, it is not possible for different employees to have the same email. Therefore, when adding/editing an employee/potential hire, there should be a check for their email to ensure that they do not have the same email.

Steps to reproduce:

  1. With the sample data, type list all Screenshot 2024-11-15 at 4.26.55 PM.png

  2. Type edit 2 e/alexyeoh@example.com Screenshot 2024-11-15 at 4.27.59 PM.png

Expected: The HR Manager should not be able to edit an existing employee/potential hire to have the same email as another employee/potential hire. So an error message should be shown.

nus-pe-script commented 1 week ago

Team's Response

This is a duplicate of #3924 just more specific to email only.

The 'Original' Bug

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

Employee and Potential Command allows for adding people with same details

Added 2 persons by typing the following into the command box:

employee n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 d/IT r/SWE ced/2024-10-09

and

employee n/John p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 d/IT r/SWE ced/2024-10-09

Screenshot 2024-11-15 at 4.41.04 PM.png

The app allows me to create 2 persons with the exact same details but only different name. I suppose the check for duplicates only uses the name field, but to the end user it does not really make sense as 2 different people cannot have the same details (eg phone number, address, email). Perhaps the team can use these fields to check for duplicates too or throw warning to user.


[original: nus-cs2103-AY2425S1/pe-interim#3809] [original labels: severity.Medium type.FunctionalityBug]

Their Response to the 'Original' Bug

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

Reason for dropping to severity low

This issue is unlikely to affect normal operations of the product as it only appears in rare situations where the user intentionally adds 2 users with the same details (phone number, address, email).

Reason for feature flaw

This is not a functionality bug as nowhere in the UG we promised users that we will validate that 2 users have the same details (phone number, address, email). Instead its a feature flaw as it is less useful as users may accidentally insert 2 users with the same details.

Reason for not in scope

This is a valid concern as users may want validation to prevent 2 users with the same details to be inserted (phone number, address, email). However, this is not in the scope as checking each field will take way more effort than the current implementation which is why we decided to leave it as not in scope.

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.NotInScope`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]
## :question: Issue type Team chose [`type.FeatureFlaw`] Originally [`type.FunctionalityBug`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]
## :question: Issue severity Team chose [`severity.Low`] Originally [`severity.Medium`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]