maiyasaliha / pe

0 stars 0 forks source link

Doctor query command works with wrong input #7

Open maiyasaliha opened 4 months ago

maiyasaliha commented 4 months ago

When accidentally inputting a wrong command format, MediCLI still queries doctors with 1234. This might be problematic as the user might have intended to query patient instead.

Example: doctor patient 1234

It is expected that an error saying invalid format is shown, however doctors are queried instead.

image.png

nus-pe-bot commented 4 months ago

Team's Response

Same explanation as issue #5191.

The command you used is still doctor followed by keywords or substrings that are matched against doctor information.

There could be an instance where the doctor's name is "Patient" therefore this is not grounds to be an issue (as the correct doctors are still listed).

The 'Original' Bug

[The team marked this bug as a duplicate of the following bug]

Patient query works with invalid command format

When accidentally inputting a wrong command format, MediCLI still queries patients with 1234. This might be problematic as the user might have intended to query doctors instead.

Example: patient doctor 1234

It is expected that an error saying invalid format is shown, however patients are queried instead.

image.png


[original: nus-cs2103-AY2324S2/pe-interim#4895] [original labels: type.FunctionalityBug severity.Medium]

Their Response to the 'Original' Bug

[This is the team's response to the above 'original' bug]

As specified by our UG section for this command (see attached below), the patient command takes any number of arguments which will be matched against all details of patient in the list (NRIC, name, dob, and phone). In your input right now, the keywords doctor, and 1234 are used to find patients. As intended, the system returns the two patients whose NRIC contains 1234.

Therefore, your command correctly searches through the list of patients who's details contain the substring you supplied (there could be an instance of someone who's name contains "doctor" as a substring).

Screenshot 2024-04-20 at 3.52.24 PM.png

Items for the Tester to Verify

:question: Issue duplicate status

Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)

Reason for disagreement: This is unlikely to be a duplicate as it is neither the exact same bug nor solved by fixing the original. As such, although similar due to the similarity in features of the 2 commands, they bugs are not duplicates as they can be fixed independently.

image.png


## :question: Issue response Team chose [`response.Rejected`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]
## :question: Issue severity Team chose [`severity.Low`] Originally [`severity.Medium`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]