nus-cs2103-AY2223S1 / pe-dev-response

0 stars 0 forks source link

Duplicate fields accepted. #3745

Open nus-pe-bot opened 1 year ago

nus-pe-bot commented 1 year ago

The app accepts contacts to have the exact same email address OR the exact same Job ID. However in reality, this cannot be true as two separate people cannot have the same email address or job ID, hence an error should be thrown.

Steps to reproduce: add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 c/3.50/4.00 g/male u/Nanyang Polytechnic gd/05-2024 m/Computer Science ji/173296 jt/Software Engineer Intern t/rejected t/KIV add n/John Doe p/98765432 e/johnd@exampl.com a/311, Clementi Ave 2, #02-25 c/3.50/4.00 g/male u/Nanyang Polytechnic gd/05-2024 m/Computer Science ji/173296 jt/Software Engineer Intern t/rejected t/KIV

Expected: Error as a duplicate is added

Actual: Contact added since the email is different

Screenshot 2022-11-11 at 4.25.21 PM.png


[original: nus-cs2103-AY2223S1/pe-interim#3547] [original labels: type.FunctionalityBug severity.Low]

cliftonfelix commented 1 year ago

Team's Response

Inside the UG, we already specified that we cannot have multiple applicants with the same email address AND Job ID. It's AND not OR

image.png

Hence, from the example you mentioned add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 c/3.50/4.00 g/male u/Nanyang Polytechnic gd/05-2024 m/Computer Science ji/173296 jt/Software Engineer Intern t/rejected t/KIV

add n/John Doe p/98765432 e/johnd@exampl.com a/311, Clementi Ave 2, #02-25 c/3.50/4.00 g/male u/Nanyang Polytechnic gd/05-2024 m/Computer Science ji/173296 jt/Software Engineer Intern t/rejected t/KIV

The first one has email johnd@example.com and the second one has email johnd@exampl.com, so from the definition of duplicate applicants. The 2 applicants are not duplicate as they have different email

Duplicate status (if any):

--