Bug 826

Summary: Command “q” is not able to go back to the previous step.
Product: Hospital System Reporter: tytwan2-c
Component: Appointment SystemAssignee: tungllam6-c
Status: CONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: Alpha Release   
Hardware: PC   
OS: Windows   
Attachments: Bug Screen Dump
Capscreen to prove the bug is fixed.

Description tytwan2-c 2023-12-09 17:15:40 HKT
Created attachment 170 [details]
Bug Screen Dump

Step To Reproduce:
Login a patient account
Input “1” in main menu to get into the appointment system
Input “1” in the appointment system to book an appointment.
Input “q” 

Actual Results:
“q” be accepted as valid illness input.

Expected Results:
Back to the appointment menu.

Suggested Fix:
Use .equalsIgnoreCase("q") to make it function well.
Comment 1 tungllam6-c 2023-12-09 17:32:24 HKT
Created attachment 171 [details]
Capscreen to prove the bug is fixed.
Comment 2 tungllam6-c 2023-12-09 17:33:31 HKT
(In reply to tytwan2-c from comment #0)
> Created attachment 170 [details]
> Bug Screen Dump
> 
> Step To Reproduce:
> Login a patient account
> Input “1” in main menu to get into the appointment system
> Input “1” in the appointment system to book an appointment.
> Input “q” 
> 
> Actual Results:
> “q” be accepted as valid illness input.
> 
> Expected Results:
> Back to the appointment menu.
> 
> Suggested Fix:
> Use .equalsIgnoreCase("q") to make it function well.

I used the wrong method to check whether two strings are equal. The bug is fixed with a suggested fix. Other part that used ==”q” is corrected as well.
Comment 3 tungllam6-c 2023-12-09 17:34:08 HKT
(In reply to tytwan2-c from comment #0)
> Created attachment 170 [details]
> Bug Screen Dump
> 
> Step To Reproduce:
> Login a patient account
> Input “1” in main menu to get into the appointment system
> Input “1” in the appointment system to book an appointment.
> Input “q” 
> 
> Actual Results:
> “q” be accepted as valid illness input.
> 
> Expected Results:
> Back to the appointment menu.
> 
> Suggested Fix:
> Use .equalsIgnoreCase("q") to make it function well.

I used the wrong method to check whether two strings are equal. The bug is fixed with a suggested fix. Other part that used ==”q” is corrected as well.