lrongyi / pe

0 stars 0 forks source link

Functionality Bug: Deleting by name is not case-sensitive #6

Open lrongyi opened 1 week ago

lrongyi commented 1 week ago

Description

Adding patients of the same name, but with different casing is allowed (Case sensitve). i.e. Alex Yeoh and Alex yeoh are different people.

However, deleting patients is not case sensitive. i.e. delete n/Alex yeoh will not delete Alex yeoh, but will throw an error.


Steps to Reproduce

(Assuming sample data is there)

  1. Add new patient named Alex yeoh
  2. delete n/Alex yeoh

Expected Behavior

Alex yeoh should be deleted, Alex Yeoh should be unaffected

Actual Behavior

Error message: Multiple patients with the same details found. Use more attributes (name, phone number, email) to identify the exact person.

nus-se-script commented 1 week ago

Team's Response

We believe that the severity should be set to Low since it is unlikely for 2 people to have the same exact name.

As for the rejection:

The actual behaviour is supposed to be the expected behaviour. In this case, "Adding patients of the same name, but with different casing is allowed" ONLY IF there is a change in the number or email, according to the duplicate person logic, as mentioned in the User Guide.

image.png

Hence, in order to delete Alex yeoh, there needs to be a different attribute (phone or email) that can differentiate Alex yeoh from Alex Yeoh

image.png

This is proven in the video below.

  1. the capitalisation of name is different, but phone and email are the same, but alex yeoh cannot be added, since this is considered a duplicate person.
  2. when the phone and email is changed, alex yeoh can now be added, since it is no longer a duplicate person
  3. to delete, you need to have at least one uniquely identifying feature. a. in this case, alex yeoh cannot be deleted using the name parameter only since there are 2 alex yeohs (case insensitive). b. to delete alex yeoh, another parameter (phone number) is specified to uniquely identify the alex yeoh to be deleted (i.e. Alex Yeoh with 91234567)
    video:https://raw.githubusercontent.com/nus-cs2103-AY2425S1/pe/master/files/a309d921-6fd7-4504-bb05-4129b4ce8e3f.mp4

    Items for the Tester to Verify

    :question: Issue response

Team chose [response.Rejected]

Reason for disagreement: This bug was more of to highlight the misleading command result output. The user guide also does not highlight whether the names should be case sensitive or not, hence confusing the user.


## :question: Issue severity Team chose [`severity.Low`] Originally [`severity.Medium`] - [x] I disagree **Reason for disagreement:** It is not unlikely for 2 people to have the exact same name, especially in a small country such as Singapore (which is where the target user is based). There are many common and repeated names such as Tan Jun Jie.