kyhjonathan / pe

0 stars 0 forks source link

Program takes user to page if the index begins with a 0 #1

Open kyhjonathan opened 5 months ago

kyhjonathan commented 5 months ago

Steps to reproduce:

  1. menu 01
  2. program takes user to menu 1

The same problem is consistent if typing in "menu 0000000000001". This command takes the user to the menu 1.

This can be an issue if the user mistypes and actually meant to type in menu 10.

screenshot of bug: image.png

Possible improvement: Could perhaps throw an exception, this can prevent users from going into the wrong menu if there is a typo. Restricting the user to type in the correct input exactly can prevent user mistakes. Could handle the user error in a similar way like how when user types in a wrong menu index

soc-se-bot commented 5 months ago

Team's Response

Thank you for your suggestion. I do understand that there could be a potential scenario where a user may end up typing menu 01 when they intended to type menu 10. However, i do believe that this is a flaw that is unlikely to affect normal operations of the product. Here are my reasons :

  1. The program does not crash
  2. The value of 01 would be the value of 1. Hence, the application displaying the commands of menu item 1 when the command menu 01 is typed is an expected output
  3. A user who accidentally typed menu 01 instead of menu 10 would be able to identify their own error (as the commands displayed wont be what they desire), and retype their command again
  4. Given the scenario where a user types menu 00010, it would still correctly show the commands for menu item 10, as 00010 = 10. Here is the example

image.png

Therefore, i believe that this severity should be low as a user being stuck after mistaking their intended menu item after mistyping the command would be a very rare situation, and causes a minor inconvenience only. In this case, the user would just have to retype the correct command. However, i do acknowledge that this may potentially be a valid flaw to certain users, hence putting it under NotInScope as this flaw would be of a lower priority in terms of implementation for v2.1.

Items for the Tester to Verify

:question: Issue response

Team chose [response.NotInScope]

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]