g-tejas / pe

0 stars 0 forks source link

Names with multiple whitespaces not detected #3

Open g-tejas opened 4 months ago

g-tejas commented 4 months ago

Description

The UG states that the name must be unique amongst students. However, a simple typo by adding two whitespaces between two words in a name, can result in a person w the same first and last name to be added in the application as shown below.

This can be confusing, as a simply typo like this results in two seemingly same name contacts inside the application, and it is difficult to discern between the two "Alex Yeoh" as shown below

Screenshots

CleanShot 2024-04-19 at 16.25.59@2x.png

CleanShot 2024-04-19 at 16.26.06@2x.png

CleanShot 2024-04-19 at 16.26.13@2x.png

Steps to reproduce

  1. Make sure a person named "Alex Yeoh" with only whitespace between the two words already exists in the application.
  2. Run command: add n/Alex Yeoh p/98765432 e/alex@example.com m/CS2103 f/Computing v/311, Clementi Ave 2, #02-25 t/friends t/owesMoney a/mon 12:00 14:00 a/thur 12:00 14:00. Make sure there are two whitespaces

Expected vs Actual Behaviour

This adds two contacts, with the same first and last name, and the UI might confuse as it is hard to discern between two names with different amount of white spaces in between. This needs to be raised as a bug to the user, so he or she knows that there's already a similar person with the name.

Suggestion

Perhaps strip the extra whitespaces between the names before checking equality with other persons. And raise an error if there's ajnother person w the same first and last name.

nus-se-script commented 4 months ago

Your response not required for this bug as the team has accepted the bug as it is.