AY2425S1-CS2103-F10-1 / tp

MIT License
1 stars 5 forks source link

[PE-D][Tester C] Unclear error message when changing a supplier's name to an existing supplier's name #208

Open nus-pe-script opened 5 days ago

nus-pe-script commented 5 days ago

Description: When attempting to change the name of an existing supplier (e.g., "Mary Tan") to a name that already exists in the address book (e.g., "John Doe"), the application displays an error message: "This person already exists in the address book." This message is unclear and does not specify which supplier it refers to or that both "Mary Tan" and "John Doe" exist in the address book. The vague wording could confuse users, as it fails to clarify that the conflict arises because both names are currently in use.

Steps to Reproduce:

  1. Ensure there are two suppliers in the address book with distinct names, such as:
add n/John Doe p/98765432 a/123 Clementi Rd #01-01 Clementi Plaza Singapore 123456
add n/Mary Tan p/88888888 a/456 Orchard Rd #10-05 Orchard Towers Singapore 234567
  1. Attempt to change "Mary Tan's" name to "John Doe" with the command: edit Mary Tan n/John Doe.
  2. Observe the error message.

Expected Result: A clear and specific error message that explains both suppliers involved in the conflict, such as: "Error: Both 'Mary Tan' and 'John Doe' exist in the address book. Cannot change name to an existing supplier's name."

Actual Result: The error message simply states, "This person already exists in the address book," which is ambiguous and does not specify the suppliers involved.

Screenshot: 1731056681520.png

Additional Notes:


Labels: type.FunctionalityBug severity.Medium original: chenle228/ped#6

yanhwee commented 4 days ago

I don't think this is a big issue really. It is rather obvious that the person that we are changing to "already exist in the address book" and we don't really have the care about the name of the person we are changing. Perhaps the error message can be clearer.

jialegitgud commented 4 days ago

Can't be changed as it would be an enhancement for error message.