Currently, the application allows the addition of these 2 similar companies Happy Burger and Happy Burger, where the second one has 2 whitespaces which could be easily reproduced by the user on accident if they accidentally made a typo.
First run this command:
add c/Happy Burger p/98765432 e/HappyBurger@example.com a/311, Clementi Ave 2, #02-25 t/I jd/Software Developer intern d/29-05-2024 1200 id/3 months s/1000 n/Company CEO is John Doe
Then run this command:
add c/Happy Burger p/98765432 e/HappyBurger@example.com a/311, Clementi Ave 2, #02-25 t/I jd/Software Developer intern d/29-05-2024 1200 id/3 months s/1000 n/Company CEO is John Doe
Note how there's extra whitespace in Happy Burger in the second add command.
Expected
It should warn the user that a same internship has been added under the same company.
Actual
A duplicate company is created, although with a typo.
Suggestion
I think this type of cases should be handled as making typo with extra whitespace is plausible, and it should at least give the user a warning.
Our add currently does not have handling for extra spaces in between two words to provide flexibility for the user to input any company name they want.
Steps to reproduce
Currently, the application allows the addition of these 2 similar companies
Happy Burger
andHappy Burger
, where the second one has 2 whitespaces which could be easily reproduced by the user on accident if they accidentally made a typo.First run this command:
add c/Happy Burger p/98765432 e/HappyBurger@example.com a/311, Clementi Ave 2, #02-25 t/I jd/Software Developer intern d/29-05-2024 1200 id/3 months s/1000 n/Company CEO is John Doe
Then run this command:
add c/Happy Burger p/98765432 e/HappyBurger@example.com a/311, Clementi Ave 2, #02-25 t/I jd/Software Developer intern d/29-05-2024 1200 id/3 months s/1000 n/Company CEO is John Doe
Note how there's extra whitespace in Happy Burger in the second add command.
Expected
It should warn the user that a same internship has been added under the same company.
Actual
A duplicate company is created, although with a typo.
Suggestion
I think this type of cases should be handled as making typo with extra whitespace is plausible, and it should at least give the user a warning.
[original: nus-cs2103-AY2324S2/pe-interim#378] [original labels: type.FunctionalityBug severity.Low]