Open nus-se-script opened 5 days ago
Thanks for the report. This has been a major point of contention for our team, and we decided to preserve AB3's duplicate handling by Name
after much thought:
We allow blank fields for all fields except Name
. If we remove the condition for duplicate person being Name
, then the following scenario can occur:
Ryan Tan
and all other fields blankName
or other fields to differentiate the RyansWe can allow duplicate handling by checking against Name
and another field e.g. Phone
. However, as all fields except Name
can be blank, this will make duplicate handling very difficult to implement if we were to preserve our current implementation of allowing blank fields.
Getting around duplicates is very easily done, on top of Name
allowing special characters such as (
and )
. e.g. the tutor could create two Ryans with the name Ryan who wears glasses
and the name Ryan who's always late
to differentiate the two.
There is no strict requirement for accurate legal names in EduTuTu as it is a app for private, personal use by private tutors.
Therefore, we believe the issue raised here is valid, but is more appropriate as a feature request for EduTuTu, and would require a lot of effort to get duplicity checking working with blank fields if we were to define duplicity by another field. Hence it is not in scope.
As duplicate persons by duplicate names is very easily circumvented, along with the lax input validation for Name
which allows special characters, and the rarity of a private tutor teaching 2 students with the exact same name, we believe it is low severity.
^ from our UG
--
Using solely Name parameter to differientiate between two students might not be ideal, especially in a tuition context where multiple students can have the same name, for example, if I have two students with the name Ryan, I would not be able to add both students into the system, even if they are two distinct students.
Maybe a better way is to check if the name AND phone number are the same, then you can considered it them as the same person. The implementation is also relatively simple, as you can just add a check at equals() method in your Peron class to differentiate them. Since this can most likely cause occasional incovenience to users, especially if they have the student with the same name, so i categorised it as Severity.Medium
[original: nus-cs2103-AY2425S1/pe-interim#3852] [original labels: severity.Medium type.FeatureFlaw]