PyromancerBoom / pe

0 stars 0 forks source link

Misleading error message while adding duplicate email #2

Open PyromancerBoom opened 4 months ago

PyromancerBoom commented 4 months ago

I first added Dohn Joe similar to the command provided in the UG:

/add_student name/Dohn Joe email/johndoe@gmail.com id/A0123456A

Then I tried adding a different student, but with duplicate email and all other fields are different:

/add_student name/Jane Doe email/johndoe@gmail.com id/A1023456B

The application nicely attempts to detect a duplicate:

image.png

However, the error message may be misleading and trick the person into thinking that the student already exists in their system.

nus-se-bot commented 4 months ago

Team's Response

Detailed under planned enhancements

The 'Original' Bug

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

Error message of add_student is not specific enough

It seems like two students cannot have the same email and student ID, so when adding a student with the same email or student ID and error is given. However, error message given is not specific and is the same for both scenarios, whether the error is in the student ID or email.

This will result in the user not being able to figure out what is wrong with the command they entered as they will not know what to fix.

image.png

image.png

Steps to reproduce:

  1. Enter "/add_student name/Zack2 id/A4234567Z email/zack@example.com tag/Student "
  2. Error "already exists in the address book!" is given
  3. Enter "/add_student name/Zack2 id/A4234567Z email/zack@example.com tag/Student "
  4. Same error is given

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

Their Response to the 'Original' Bug

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

Detailed in planned enhancement.

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]