Open maiyasaliha opened 4 months ago
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 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.
[original: nus-cs2103-AY2324S2/pe-interim#4895] [original labels: type.FunctionalityBug severity.Medium]
[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 keywordsdoctor
, and1234
are used to find patients. As intended, the system returns the two patients whose NRIC contains1234
.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).
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.
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.